Jump to content

Preserving RewriteBase when removing www.


MrAdam

Recommended Posts

Hi guys,I was wondering how when you remove www. from the URL using mod_rewrite, can you preserve the RewriteBase?For example:

   RewriteBase /qa	# Rewrite www. requests	RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]	RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

When this rewrites the request, "/qa" will be lost. I was hoping to preserve it, so that I don't have to hard-code any paths within the rules.ThanksAdam

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...