目前我使用托管与lightspeed服务器。主机表示mod_rewrite已启用,但我无法让我的脚本在那里工作。每当我尝试访问该URL时,它返回404 – 找不到页面。
我把相同的代码在另一个服务器运行与Apache。它在那里工作。所以我想,这是.htaccess和mod_rewrite问题。
但是主机支持仍然坚持我,他们的mod_rewrite是,所以我想知道如何检查是否mod_rewrite是启用。
我试图检查phpinfo(),但没有运气,我不能找到mod_rewrite有,是因为他们是使用lightspeed?
有没有反正检查?请帮助我。谢谢。
FYI:我的.htaccess代码是
选项 – 索引
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
我试过这样也
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
但结果相同。