[opencms-dev] opencms URL rewrite
Rene Hinojosa
r_hinojosa at cityofsouthfield.com
Tue Oct 7 17:06:02 CEST 2003
Greeting All,
Just wanted to note a change I had to make to the original rewrite code
I posted last week. I found a problem with the original when you are
passing parameters into jsp pages that are included in other jsp pages.
The correctly working code is as follows:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteLog "/var/log/httpd/rewrite.log"
RewriteLogLevel 1
#Redirect root URL entry through proxy. URL
RewriteRule ^/$ /opencms/opencms/internet/ [P]
#Redirect all entries to /internet/ I have a directory that I want as
the root of the site
RewriteRule ^/opencms/opencms/internet/?(.*)$ /internet/$1 [P,QSA]
#This was originally R but changed to P(roxy), Q(uery) S(tring)
A(ttached)
#Redirect admin login properly. Can use RewriteCond to make login
secure by use host variable or whatever.
RewriteRule ^/system/login$ /opencms/opencms/system/login [R]
#Redirect all /internet/ page through tomcat
RewriteRule ^/internet/(.*)$ http://<<insert your tomcat
ip>>:8080/opencms/opencms/internet/$1 [P,QSA]
</IfModule>
Rene
More information about the opencms-dev
mailing list