Jump to content

Preserving RewriteBase when removing www.


MrAdam
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...