0
如何從url結尾刪除查詢字符串? 更具體,這是我重寫規則:刪除查詢字符串 - 重寫規則
RewriteRule example-(.*).html$ examples/view-example.php?param1=parameter¶m2=$1&split=-
,我想這回404或重定向到www.mydomain.com/example-one.html
:
www.mydomain.com/example-one.html?param1=parameter¶m2=one&split=-
這就是我想,這不工作:
RewriteCond %{REQUEST_URI} /examples/view-example\.php
RewriteCond %{QUERY_STRING} param1=parameter¶m2=(.*)&split=-
RewriteRule ^(.*)$ http://mydomain.com/example-%1.html$
我認爲RewriteRule ^(.*)$ http://mydomain.com/example-%1.html$
是不正確的..