这是我点击菜单后的网址
http://mywebsite.com/page/english-lession/learn-about-influential-people
之后,在同一页面上,我还有另一个菜单进行排序。当我单击它时,它会在URL中添加&mode = advanced。
我在最后添加了模式变量 http://mywebsite.com/page/english-lession/learn-about-influential-people&mode=advanced
这是我的代码:
Options -Indexes
<IfModule mod_rewrite.c>
Options +MultiViews
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
#RewriteRule ^([^/]*)/([^/]*)$ /page?lang=$1&id=$2 [L]
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /page\?lang=(.*)&id=(.*)\ HTTP
RewriteRule ^ /page/%2/%3\? [R,L]
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /page\?lang=(.*)&id=(.*)&mode=(.*)\ HTTP
RewriteRule ^ /page/%2/%3/%4\? [R,L]
</IfModule>
请给我我错的解决方案