我有這樣的重寫規則...重寫到新的域名?與網址查詢?不工作。 :(幫助
重定向從world.example.com到web.example.com
RewriteCond %{HTTP_HOST} ^world\.example\.com$ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^(.*)$ https://web.example.com$1 [R=301,L]
所有初始請求偉大的工程。不過,我的一些應用有...
https://world.example.com/approvals/?id=b47b5256567
不幸的是,它沒有被正確地重定向到web.example.com。相反,它只是去web.example.com沒有查詢參數。
我怎樣才能使所有請求重定向到web.example.com以及查詢參數?
基本上,它應該做的......
https://world.example.com/approvals/?id=b47b5256567
then
https://web.example.com/approvals/?id=b47b5256567
只是改變了世界的網絡並通過查詢字符串。
幫助
很好。等一下,讓我試試。我應該關閉RewriteEngine嗎? – 2009-08-28 01:41:34
Redirect指令不使用RewriteEngine,所以沒關係。 – 2009-08-28 01:51:45
明白了!有效!但是,只有在http。如果使用https://world.example.com鏈接,則只會重定向到主頁面,而不會查詢https://web.example.com。 不知道這是否可能只是我,但我的world.example.com(是一個自簽名證書),不知道這是否導致問題。 但總體而言 - 解決方案很容易。謝謝你。 – 2009-08-28 02:01:03