.htaccess blocking access to PHP page
I have a directory in my Apache web service.
If I have no configuration file in it I can access a test.php
file in it,
but as开发者_运维百科 soon as I add the following .htaccess
file I get a 404 error.
Why and what do needs to be added or changed in the .htaccess
file?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# NOTE: If you added a web_prefix to config, add it here too, e.g.:
RewriteRule (.*) /shindig/index.php [L]
#RewriteRule (.*) index.php [L]
# for OAuth signatures to work for POSTed data,
# always_populate_raw_data needs to be turned on
php_flag always_populate_raw_post_data On
php_flag magic_quotes_gpc Off
</IfModule>
Temporarily change to [L] to [L,R], and see if it is redirecting.
It may just need removing the / before shindig to get it working.
The problem wasn't actualy htaccess file but the index.php that was doing further redirecting to other not existing files. Thanks everyone
精彩评论