1and1 htaccess 301 Redirect Code for Directory Installations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 50gi
    New Member
    • Dec 2009
    • 11
    • 4.0.0

    [Forum] 1and1 htaccess 301 Redirect Code for Directory Installations

    Hello fellow 1and1 users:

    I have VB installed at domain.com/forums/ and after upgrading to 4.0 suddenly my .htaccess wasn't sending domain.com or www.domain.com to the /forums/ anymore.

    After way too much trial and error I found this code worked for me:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$
    RewriteCond %{REQUEST_URI} !^/forums/
    RewriteRule (.*) /forums/$1
    It looks nothing like the code I had before but it works now so I'm not asking any questions.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...