我的Apache Web服务中有一个目录。
如果我没有配置文件,我可以访问其中的test.php
文件,
但是一旦我添加以下.htaccess
文件,我就会收到404错误。
.htaccess
文件中需要添加或更改的原因和内容是什么?
<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>
答案 0 :(得分:1)
暂时更改为[L]至[L,R],并查看是否重定向。
可能只需要移除/之前的shindig即可使其正常工作。
答案 1 :(得分:0)
问题不是实际的htaccess文件,而是index.php正在进一步重定向到其他不存在的文件。 谢谢大家