Helpful Information
 
 
Category: Search Engines
Mod rewrite and secondary domain

Hi there,

I have a few domains registered with westhost and on one of the sites I want to use mod_rewrite to convert my dynamic urls to static ones.

I have the same Apache, PHP, MySQL set up on my local box and have tested out my mod_rewrite script and it executes flawlessly. When I uploaded my httpd.conf file (well, at least the rewriterules) to westhost, nothing happened (after restarting the VPS).

The only catch or difference that I can think of is that these mod_rewrites are for a secondary domain that exists in a subfolder of my "/var/www/html" directory. My second domain points to "/var/www/html/secondDomain/".

Will this cause a problem with my rewrites?

Also, when applying mod_rewrite rules, does WestHost tweak the url from secondDomain.com to firstDomain.com/secondDomain (as per my structure)? Is that what is throwing off mod_rewrite? Or am I losing it?

Don't know if this matters, but my rewrite.log file I created using the RewriteLog directive (Level 9) is 0 bytes.

You must placed the mod_rewrite code inside of your VirtualHost tag for that domain. Jeesh. Pain in my arse.










privacy (GDPR)