0
這聽起來像是一個非常簡單的任務重定向,我想一個url重定向,如:mod_rewrite對舊服務器到新的
https://oldserver.com/signup/name
到 https://newserver.com/sign_up/?alias=name
繼mod_rewrite的文檔(here)對於這種情況失敗。
我.htaccess
到目前爲止是:
RewriteEngine On
RewriteRule ^/signup/(.+) https://newsite.com/sign_up/?alias=$1 [R,L]
# Catch-all
RewriteRule ^(.*)$ https://newsite.com/$1 [R=301,L]
可有人告訴我可能是什麼問題?
編輯
添加
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
之前,首先重寫規則仍然導致404