【发布时间】:2019-08-31 16:13:23
【问题描述】:
我有一个托管在 AWS 上的 WordPress 网站,我很难配置 mod_rewrite 以使其正常工作。
文件夹结构
/root
|_ staging/
|_ live/
.htaccess 是 WordPress 的默认值
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
主要问题
我可以访问/staging/index.php/api,而我以前没有像---.com/api 这样的子目录来访问它。
当我尝试/staging/api 时,它显示File not found。
我尝试将.htaccess 更改为不同的东西,但都没有成功。
根目录下没有.htaccess文件。
我们将不胜感激 =)
提前致谢。
【问题讨论】:
标签: php wordpress mod-rewrite apache2