By stoob on
Hi I have a D6 install at domain.us/drupal
I am trying to redirect all traffic to www.domain.us/drupal to domain.us/drupal
Mod rewrites are enabled (and currently working for clean URLs).
I have tried un-commenting out these lines of the default Drupal .htaccess file.
Yes I replace "domain" with my actual domain name.
### I uncomment the below 2 lines
RewriteCond %{HTTP_HOST} ^www\.domain\.us$ [NC]
RewriteRule ^(.*)$ http://domain.us/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
### I uncomment this 1 line below
RewriteBase /drupal
The effect of this code is that all requests to www.domain.us/drupal are redirected to domain.us/ (the drupal is removed).
What is wrong? Any ideas how to get the RewriteRule to actually work? Thanks!
Comments
Have you tired commenting the
Have you tired commenting the RewriteBase /drupal with the un-commented RewriteCond and RewriteRule ?
Thanks for the idea.
Thanks for the idea. Unfortunately I tried that and the result is the same.