Have all internal links in drupal leave out subdirectory where docroot resides

Posted by Levi Wallach on Stack Overflow See other posts from Stack Overflow or by Levi Wallach
Published on 2012-12-13T19:21:52Z Indexed on 2012/12/14 5:03 UTC
Read the original article Hit count: 111

Filed under:
|
|

I've successfully followed some instructions online to get our plain url to direct to the content found in a subfolder (drupaldev) so that when you enter any url for that site even without the subdirectory name, it serves the correct page. However, I cannot figure out how to remove the internal links on the site that reference the '/drupaldev/' subdirectory.

This is what my .htaccess file includes:

RewriteRule ^$ drupaldev/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/drupaldev%{REQUEST_URI} -f
RewriteRule .* drupaldev/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* drupaldev/index.php?q=$0 [QSA]

And this is what my settings.php file contains:

$base_url = 'http://www.bluewaterfederal.com'; 

As you can see, if you mouse over any of the links within the site, they all mention drupaldev, but if you take that same url and remove the "drupaldev" from it, it works fine...

© Stack Overflow or respective owner

Related posts about php

Related posts about mod-rewrite