2016-09-14 94 views
3

我已經搜索並嘗試了各種主題,將PHP參數的URL重定向到URL,但無法使其正常工作。使用PHP參數重定向URL

我有以下網址:

http://www.example.nl/?option=com_neorecruit&task=offer_view&id=82&Itemid=9 

需要被重定向到簡單

http://www.example.nl/ 

的片斷我迄今發現導致我這個,我在我的.htaccess補充說:

RewriteCond %{QUERY_STRING} option=com_neorecruit&task=offer_view&id=82&Itemid=9 
RewriteRule ^(.*)$ http://www.example.nl/ [R=301,L] 

但我不能完全讓它正常工作。任何人都可以幫助我或指出我的方向嗎?

回答

0

嘗試像這樣,

RewriteCond %{QUERY_STRING} ^option=com_neorecruit&task=offer_view&id=82&Itemid=9$ 
RewriteRule^http://www.example.nl/ [R=301,L] 
+0

謝謝,但遺憾的是它並沒有區別。 – Jelmer

+0

嘗試在字符串中使用\之前並像'\&'。 –