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重定向到另一个端口。