1
我想重寫一個URL,我不希望現有鏈接再轉到舊頁面(地址)。重定向並重寫URL htaccess
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^about-us$ /shop/static_page\.php\?static_page_id=3 [NC,L]
這是我的.htaccess文件看起來像此刻,它工作正常 - 儘管當我在一個正常的重定向規則添加如:
Redirect 301 /shop/static_page.php?static_page_id=3 http://example.com/about-us
這不起作用 - 就好像這條線不存在一樣。請有任何想法嗎?
感謝您的提示,您是否能夠發佈一個例子它應該是什麼樣子?非常感謝:) – Tim
@Tim:剛剛使用示例代碼進行編輯。 – anubhava
美麗。謝謝*非常* @anubhava – Tim