Reputation: 1896
I'm trying to figure out the best way to use mod_rewrite to change a URL from:
to:
http://localhost:8081/subdomain
I only want it to re-direct if it matches that specific port number.
Upvotes: 0
Views: 287
Reputation: 536
How about this:
<VirtualHost *:8081>
ServerName host.domain.com
RewriteEngine On
RewriteRule ^(.*)$ http://host.domain.com:8081/subdomain/$1 [P]
</VirtualHost>
Upvotes: 1