0
使用301的設置我的.htaccess文件。 對於大多數所有工作的罰款從以下重定向分開......301使用.htaccess
RewriteRule bluewidget /blue-widget/ [R=301,L]
RewriteRule bluewidget/folder2 /blue-widget/folder2/page2 [R=301,L]
RewriteRule bluewidget/folder3 /blue-widget/folder3/page3 [R=301,L]
如果我轉到ww.mysite.com/bluewidget - 重定向到ww.mysite.com/blue-widget(這是正確的)
但是......
如果我轉到ww.mysite.com/bluewidget/folder2
- 這重定向到ww.mysite.com/blue-widget
(應轉到ww.mysite.com/blue-widget/folder2/page2
) 或 ww.mysite.com/bluewidget/folder3
- 這重定向到ww.mysite.com/blue-widget
(應轉到ww.mysite.com/blue-widget/folder3/page3
)
我在做什麼錯?
感謝您的回答!你能解釋2 $和3 $的含義嗎? – Trevor
'$'標記請求url的結尾(必須被覆蓋)。 – Havelock