.htaccess - Apache supposedly ignoring htaccess directive? -


i have following in .htaccess file:

rewritecond %{request_filename} -f [or] rewritecond %{request_filename} -l [or] rewritecond %{request_filename} -d rewriterule ^.*$ - [nc,l]  rewritecond %{request_filename} !admin\.php$ rewritecond %{request_filename} \.php$ rewriterule ^.*$ - [g]  rewriterule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [nc,l] rewriterule ^.*$ index.php [nc,l] 

what should do, if file valid file nothing should happen (the file should processed normally) - works.

next, if file has .php extension, isn't admin.php, should return 410 gone status. doesn't work - goes next directives, , second block ignored.

example url: http://<my site>/file.php - doesn't return 410, goes last directive.

why happening?

(also, don't think stackoverflow site question, couldn't think of :/)

edit: should point out works fine on windows localhost, not on live linux server.

edit2: still doesn't work on live box dot escaped. if move second block above first, goned.

is .htaccess file in 1 of user directories? if so, problem may need specify allowoverride in apache configuration. see http://httpd.apache.org/docs/2.0/howto/htaccess.html more info.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -