由网友(难以启齿的痛)分享简介:我得在.htaccess如下:I've got the following in .htaccess:RewriteCond %{REQUEST_URI} !app/index\.php$RewriteRule ^(.*\.htm)$ index.php?url=$0 [QSA,L]Everyting的伟大工程,...
我得在.htaccess如下:
I've got the following in .htaccess:
RewriteCond %{REQUEST_URI} !app/index.php$
RewriteRule ^(.*.htm)$ index.php?url=$0 [QSA,L]
Everyting的伟大工程,但得到的结果URL都有空的$ _ POST
Everyting works great but result URLs have empty $_POST.
我100%肯定它是mod_rewrite的错误,而不是HTML或PHP,因为当我改变[QSA,L]为[L]它的伟大工程。但我真的需要QSA。
I'm 100% sure that it's mod_rewrite bug, not HTML or PHP because when I change [QSA,L] to [L] it works great. But I really need QSA.
它发生在30%左右hostings所以这可能是一些Apache配置选项。
It happens at about 30% hostings so this may be some Apache config option.
推荐答案
在默认情况下,..也许APACHE不会启用mod_rewrite的,试试输入这个控制台上
by default,.. maybe apache not enable mod_rewrite, try type this on your console
须藤a2enmod重写
品尝我的.htaccess
sample my .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
相关推荐
最新文章