I want redirect some URLs to a different PORT. My .htaccess is:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^(.*)/$
RewriteCond %{REQUEST_URI} !^(.*)(.)(.*)$
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI}/ [R=301,L]
I need to add a rule that redirects all requests with ^some-prefix/ at the beginning to port 8080, example:
1- URL
http://www.mysite.com/page1
will redirect to
http://www.mysite.com/page1/
BUT
2- URL
http://www.mysite.com/some-prefix/page2
will redirect to
http://www.mysite.com:8080/some-prefix/page2/
How can I do this? Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…