1

我無法從包含帶字母數字字符的鏈接的舊網站重定向。使用字母數字字符重定向htacess

以下是我有:

Redirect 301 /itemlist.asp?depart=Entry+Doors&subcat=Wood+%26+Wrought+Iron&disnum=all /index.html 

.htaccess文件不承認舊的鏈接的網址。我已經搜遍了全部,但答案是針對這些問題的。這並沒有明顯的幫助我的情況。任何幫助將不勝感激。

+0

查詢字符串不能使用'Redirect'指令相匹配。在'mod_rewrite'中使用'RewriteCond' – anubhava

回答

0

使用類似:

RewriteEngine on 
RewriteCond %{QUERY_STRING} =depart=Entry+Doors&subcat=Wood+%26+Wrought+Iron&disnum=all 
RewriteRule^/index.html [R=301,L] 
+0

我試過這個,但無濟於事 – SmartTech

+0

你到底做了什麼? – SuperDuperApps

+0

我複製並粘貼了您提供的代碼。 – SmartTech