0
Following,
I have a URL: http://ip_do_server/fop2
What I wanted to do is, when someone enters this url, apache redirects to the following address: http://ip_do_server:81/mesa_contact/login
I’ve tried several things including looked at other issues from here in the community, but always bump into the fact that the door is different...
Is there any way to do this using htaccess?
Cara didn’t work. His logic is apparently right, but remember that in the browsers the default port is 80, so they don’t stay in the url. that can’t be why?
– Matheus Suffi
Port does not need to be in URL.
%{SERVER_PORT}
is a server variable with the correct port. I’m sure it works. I uploaded it to a free hosting on http://mariano.uphero.com/260627/fop2 if you want to test it. You have other lines on your . htaccess?– Mariano
Next, your logic is right yes, I read a little about the operation of . htaccess and really what you did should work. Only that my apache works with different ports/applications, it turns out that it has mta configuration in it, probably I’m not able to use . htaccess for lack of putting some extra conf on the part of the sites-enabled, etc.
– Matheus Suffi