I'm now working in a server environment where I can access and edit httpd.conf, which is preferable from a performance and a revision control standpoint. I have a few sites (they are Drupal) running in subdirectories along the lines of dev.blah.com/yourname, dev.blah.com/anothername, dev.blah.com/anotherdev. Right now they have a rewrite rule along the lines of

RewriteBase /yourname

in each of their htaccess files. This doesn't work in httpd.conf and some of the documentation I've been reading says Rewritebase is bad to put in httpd.conf anyway. Any insight into the right approach would be greatly appreciated.


When you don't have a rewrite base, all you have to do is insert what would have been the base into each of your rewrite rules.

RewriteRule ^index\.html$  welcome.html 


RewriteRule ^/index\.html$  /welcome.html 
| improve this answer | |
  • Which RewriteRules do I use to replace RewriteBase? – Melissa Sep 11 '14 at 22:39
  • You don't "replace" RewriteBase, you remove it, and then edit each end every one of your RewriteRules to add the slash in as I have done in an example. – Stephen Ostermiller Sep 11 '14 at 22:44
  • There weren't any rewriterules used, just the rewritebase – Melissa Sep 11 '14 at 22:54
  • There was an alias for the directory (for example yourname site was in the directory yourname123...I didn't set this server up, so I have no idea why) and when I removed that and then just renamed the subdirectories to their respective names (renamed yourname123 to yourname), it started to work without the rewritebase. I still am curious how to do it with the alias intact though. – Melissa Sep 11 '14 at 23:05
  • 2
    If there are no rewrite rules, the RewriteBase won't have any effect on its own. It can safely be removed. – Stephen Ostermiller Sep 11 '14 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.