我想弄清楚为什么我的Rewriterule doest正常工作。
RewriteRule ^en/(.*).php?(.*)#(.*) $1.php?$2&language=english#$3 [NC,L,QSA]
RewriteRule ^en/(.*).php?(.*) $1.php?$2&language=english [NC,L,QSA]
RewriteRule ^en/(.*).php#(.*) $1.php?language=english#$2 [NC,L,QSA]
RewriteRule ^en/(.*).php$ $1.php?language=english [NC,L,QSA]
RewriteRule ^en/$ index.php?language=english [NC,L,QSA]
我目前可以使用www.example.com/?language=english
但是当我要打开www.example.com/en
时,我会看到404页。
答案 0 :(得分:2)
尝试:
RewriteRule ^en/(.*)\.php $1.php?language=english [NC,L,QSA]
RewriteRule ^en/?$ index.php?language=english [NC,L,QSA]