1
我想要將包含?_escaped_fragment_ =的URL重定向到另一個端口。舉一個例子,htaccess從一個端口重定向到另一個
http://localhost:8080/web/?_escaped_fragment_=/privacy
到
http://localhost:8082/web/?_escaped_fragment_=/privacy
我當前htaccess的是如下。
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$
RewriteRule ^(.*)$ http://dev.dermveda.com:8082/$1 [r=301,nc]
的問題是,如果URL中包含web/
,它不重定向到我新的端口。但如果它沒有web/
它重定向罰款。 例如 像http://localhost:8080/web/?_escaped_fragment_=/privacy
這樣的網址沒有重定向。但是像http://localhost:8080/?_escaped_fragment_=/privacy
這樣的URL會被重定向。我的問題是,我應該如何實現htaccess將web/
的URL重定向到另一個端口。