Php 为什么apache mod_rewrite没有正确路由/索引?
工作正常:Php 为什么apache mod_rewrite没有正确路由/索引?,php,apache,.htaccess,mod-rewrite,Php,Apache,.htaccess,Mod Rewrite,工作正常: 当转到/index.php时,将加载站点主页 当转到/sdagkljahsdf/sdfsafdsaf/站点(框架)404时 通过index.php加载 工作不正常: 当转到/index时,apache错误消息附带Not 找到:在此服务器上找不到请求的URL/索引。 因此,使用apaches404不通过框架index.php 我想让它通过index.php 这是我的.htaccess: SetEnv APPLICATION_ENV [] php_flag display_err
- 当转到
时,将加载站点主页/index.php
- 当转到
站点(框架)404时 通过/sdagkljahsdf/sdfsafdsaf/
index.php加载
- 当转到
时,apache错误消息附带/index
:Not 找到
在此服务器上找不到请求的URL/索引。
404
不通过框架index.php
我想让它通过index.php
这是我的.htaccess
:
SetEnv APPLICATION_ENV []
php_flag display_errors off
php_flag html_errors off
php_flag log_errors off
#hide index.php
<ifModule mod_rewrite.c>
#Turn on the engine
RewriteEngine on
#Don't Perform for files and directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#Exerything else redirect to index.php
RewriteRule ^(.*)$ index.php/$1
</ifModule>
Redirect 301 /donate /funding
Redirect 301 /site/donate /funding
你还有其他规则吗?@starkeen就是这样,除了一些
php_标志
s和一些301重定向
扫描你发布的完整htaccess之外?@starkeen我已经更新了它
<Directory {{ www_path }}>
Options Indexes MultiViews FollowSymLinks
AllowOverride All
</Directory>