By ninetwenty on
Hi. I have my drupal site in its own folder and I was wondering if there was any way to use mod_rewrite to change my URLs from:
to
etc.
Hi. I have my drupal site in its own folder and I was wondering if there was any way to use mod_rewrite to change my URLs from:
to
etc.
Comments
Never mind...
After many frustrating hours I solved it. Just in case anyone wants to know the rules I use in .htaccess in the root folder are as follows:
The first rule maps www.example.com to www.example.com/site
The second and thirs are conditions, basically we don't want to rewrite if it is a valid file or directory.
The last line maps www.example.com/whatever/etc to www.example.com/site/whatever/etc
The drupal .htaccess in the site folder should then map www.example.com/site/whatever/etc to www.example.com/site/index.php?q=whatever/etc
In your settings you will also need to set $base_url as http://www.example.com for this to work properly.