Link to home
Start Free TrialLog in
Avatar of willa666
willa666Flag for United States of America

asked on

rewrite rule inc port

I need a rewrite rule that will rewrite the url to do the following:

if url http://domain.com:81/anything rewrite to http://domain.com:81/app/con/index.jsp

Also i dont really want to specify the domain/cname in the rule
Avatar of ravenpl
ravenpl
Flag of Poland image

Into the .htaccess file

RewriteEngine On
RewriteCond %{SERVER_PORT} =81
RewriteRule ^anything.* http://domain.com:81/app/con/index.jsp [R=301,L]
Avatar of willa666

ASKER

Hi ravenpl

Is there a way of not specifing the "http://domain.com:81?

Ww
No, If You want other than the default port 80, You have to specify it.
ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial