Reputation: 21
Here is my setup :
I have a website located at www.cabsh.org/drupal
I want to use mod_rewrite to do 2 things :
I cannot figure how to achieve the 2nd point. I'm using .htaccess files since I cannot use the main server configuration. Can anyone help me getting this to work?
Thanks!
Upvotes: 2
Views: 345
Reputation: 19169
From what I get from your comment, you just want something like this:
RewriteEngine on
# Prevent a request directly to the /drupal folder
RewriteCond %{THE_REQUEST} ^[A-Z]+\s/drupal/
RewriteRule ^drupal/(.*)$ /site/$1 [R=301,L]
# Change a request for /site/(anything) to /drupal/(anything)
RewriteRule ^site/(.*)$ /drupal/$1
Be careful though, since Drupal (being in the Drupal folder) might generate links that point to /drupal instead of /site, which is seemingly not what you want.
Upvotes: 1