You are here: Home / Documentation / How To's / VirtualHost RewriteRule tip

VirtualHost RewriteRule tip

by nguyen — published Sep 16, 2008 10:53 AM, last modified Aug 16, 2016 10:50 AM
for Apache web server acting as a front-end to Plone/Zope

What is wrong with this RewriteRule?

I would like http://cmf.it.uwosh.edu/facultysenate to go to

http://localhost:10080/FacultySenate

on cmf.it.uwosh.edu...

When I go to the http://cmf.it.uwosh.edu/facultysenate URL it displays only partially, and links to anything are missing the "/FacultySenate" part.  

RewriteRule ^/facultysenate(.*) http://localhost:10080/VirtualHostBase/http/cmf.it.uwosh.edu:80/FacultySenate/VirtualHostRoot/$1 [P,L]

 

Answer

You'll need a _vh_facultysenate at the end: /VirtualHostRoot/_vh_facultysenate$1

RewriteRule ^/facultysenate(.*) http://localhost:10080/VirtualHostBase/http/cmf.it.uwosh.edu:80/FacultySenate/VirtualHostRoot/_vh_facultysenate$1 [P,L]

 

Navigation