0

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/  http://websvn.borg.local/websvn 
ProxyPassReverse  /websvn/ http://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/     https://phpmyadmin.borg.local/phpmyadmin/ 
ProxyPassReverse    /phpmyadmin/     https://phpmyadmin.borg.local/phpmyadmin/ 
 
0

you can do like this:

Redirect permanent /websvn/ http://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: http://websvn.borg.local/websvn/ is better than http://websvn.borg.local/websvn

http://websvn.borg.local/websvn add an useless redirect to http://websvn.borg.local/websvn/

  • Sorry about that. This is running CentOS 7.1 with latest apache 2.4.6. I main access it using firefox internally. – andrewm659 Oct 5 '15 at 14:03
  • Also, will a redirect permanent work with the other subdomains on this server as well? – andrewm659 Oct 5 '15 at 14:04
  • if pattern /websvn/ is found en requested url it will redirect, so if you have a subdomain like http://{anything}.borg.local/websvn it will work by the way http://{anything}.borg.local/websvn = http://{anything}.borg.local/websvn/ but with a redirection from websvn to websvn/ so i edited the post to improve the answer – Froggiz Oct 6 '15 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.