Mobile app version of vmapp.org
Login or Join
Murray432

: 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

@Murray432

Posted in: #Apache2 #ModRewrite #Redirects

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/

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray432

1 Comments

Sorted by latest first Latest Oldest Best

 

@Miguel251

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/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme