我需要重定向我的舊的鏈接(刪除)在我的新的鏈接與.htaccess文件, 例如,的.htaccess與重定向URL參數在一個新的URL
From: http://www.example.com/page.php?value=2 (deleted)
To: http://www.example.com/detail.php?d=150
我試着用這個,但別沒有工作。如果檔案(page.php)不存在,則服務器會給我找不到404頁面。
我的.htaccess
<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
RewriteEngine On
RewriteRule http://www.example.com/page.php?value=2 http://www.example.it/detail.php?d=150 [END,R=301]
order deny,allow
你能幫助我嗎?
RewriteRule^http://www.example.com/page.php?value = 2 $ http://www.example.com/detail.php?d=150 [ R = 301,L] 試試這個 –