Hi,
I have a site on shared hosting. For organization's sake, I have to put my drupal code in a folder, so my site is accessed like this:

http://www.mysite.com/drupal_directory/

I'd like to get rid of drupal_directory in the url and have old content redirected to the new, folder-less url.

I got it to rewrite the drupal_directory out, but was not able to also get the redirect to work. I was able to access the content, but was not able to get a 301 redirect to work.

Please let me know if you are interested.

Thanks
Sam

Comments

droid19’s picture

Have you tried setting the DocumentRoot to /path/to/your/site/drupal_directory in your virtualhost config

sam_squarewave’s picture

http://blog.tremend.ro/2009/10/20/how-to-move-drupal-to-a-subdirectory-a...

This article seems to do mostly what i want, just not the redirects from old content.

I've tried modifying this section by adding R=301 and modifying the redirect url, but nothing seems to happend. I also tried removing the L flag since it seems like further rewrites would need to happen.

# Let Drupal process paths like www.example.com/corporate/about
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^corporate/(.*)$ corporate/index.php?q=$1 [L,QSA]

Thanks for your help.