Hi,
I'm moving my windows wordpress main portal to Centos 7 server and is working now and very fast.
But I want redirect all subdirectories to the windows server (IIS) less the root page.
for example.
This is my main page that is in centos server with wordpress
www.extranet.com
When the user browse www.extranet.com I want that stay there and open the wordpress
but if the user manually write down and browse www.extranet.com/subdirectory1, www.extranet.com/subdirectory2, www.extranet.com/subdirectory_N, I want to redirect to www.win_server.com/subdirectory1, www.win_server.com/subdirectory2, www.win_server.com/subdirectory_N.
I can't find something similar that I want.
I can do that en centos/apache?
Regards
Redirecting all subdirectory to another site
Re: Redirecting all subdirectory to another site
If you know that you want to redirect specific names then it's easy.
Repeat that pair for each name you want to redirect.
That's from an ancient httpd.conf I have from about 15 years ago. It also has
which may be required to make it all work.
Code: Select all
ProxyPass /confluence http://windows.server/confluence
ProxyPassReverse /confluence http://windows.server/confluence
That's from an ancient httpd.conf I have from about 15 years ago. It also has
Code: Select all
ProxyRequests off
ProxyPreserveHost On
ProxyTimeout 3000
SSLPRoxyEngine On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Redirecting all subdirectory to another site
Thanks Trevor. And are there a general rule tha redirect all the subdirectories by default?
Re: Redirecting all subdirectory to another site
Not sure if C7 is a good choice - it will die in 17 months time.
A better choice may be one of the rebuilds of RHEL8+9, like Rocky, Alma, etc.
A better choice may be one of the rebuilds of RHEL8+9, like Rocky, Alma, etc.
Re: Redirecting all subdirectory to another site
You can do all sorts of things with rewrite rules and probably with Proxy lines too but in general it's probably safer to redirect only known things to your windows server. Better to spend some time analyzing the logs and see what urls are used on there and then add specific redirect proxy lines for those and stop everything else going through.
The upstream Apache httpd docs are probably useful.
And I agree that deploying 7 at this late stage in its lifecycle is probably short sighted.
The upstream Apache httpd docs are probably useful.
And I agree that deploying 7 at this late stage in its lifecycle is probably short sighted.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke