Mobile app version of vmapp.org
Login or Join
Debbie626

: Moving RewriteBase rule in htaccess to httpd.conf 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

@Debbie626

Posted in: #Apache #Subdirectory

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Debbie626

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

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


Becomes

RewriteRule ^/index.html$ /welcome.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme