: How do I setup redirect for multiple subdomains to different folders So I have 2 sites on this particular server and this is all internal, but when a user goes to websvn for instance, I want
So I have 2 sites on this particular server and this is all internal, but when a user goes to websvn for instance, I want them to go to websvn.domain.local and it is going there but it is also redirecting to /phpmyadmin
CentOS 7.1 Apache 2.4.6 all internal domains.
Not sure what I'm doing wrong.
Here is what I have so far for websvn.conf
Code:
Alias /websvn /usr/share/websvn/
ServerName websvn.borg.local
RewriteEngine On
RewriteCond %{REQUEST_URI} ^websvn.borg.local [nc]
RewriteRule (.*)$ /websvn/ [R=301]
ProxyRequests Off
ProxyPreserveHost On
Order deny,allow
Allow from all
ProxyPass /websvn/ websvn.borg.local/websvn
ProxyPassReverse /websvn/ websvn.borg.local/websvn
Options +MultiViews
DirectoryIndex wsvn.php index.html index.php index.cgi index.pl
# Apache 2.4
Require ip 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12
# Apache 2.2
order deny,allow
deny from all
allow from 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12
Here is my phpMyAdmin.conf
Code:
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
ServerName phpmyadmin.borg.local
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) /phpMyAdmin/ [R=301]
ProxyRequests Off
ProxyPreserveHost On
Order deny,allow
Allow from all
ProxyPass /phpmyadmin/ phpmyadmin.borg.local/phpmyadmin/
ProxyPassReverse /phpmyadmin/ phpmyadmin.borg.local/phpmyadmin/
More posts by @Murray432
1 Comments
Sorted by latest first Latest Oldest Best
you can do like this:
Redirect permanent /websvn/ websvn.borg.local/websvn/
By the way there some info missing: server type, how you access your web site, mainly.
There lot of way to redirect trafic in apache config.
PS: websvn.borg.local/websvn/ is better than websvn.borg.local/websvn websvn.borg.local/websvn add an useless redirect to websvn.borg.local/websvn/
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.