Can't Login after redirecting htaccess to www.site.com

Discussion in 'Site & Server Administration' started by enwise, Oct 30, 2008.

  1. #1
    My site was without the www for a while.. but now since I added it I can't login. I tried clearing cookies and cache and still it doesnt work. Is there anything I can do? Here is my htaccess file

    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    
    # (http://example.com/... will be redirected to http://www.example.com/...)
      RewriteCond %{HTTP_HOST} ^site\.net$ [NC]
      RewriteRule ^(.*)$ http://www.site.net/$1 [L,R=301]
      
    # 301 Redirect all requests that don't contain a dot or trailing slash to
    # include a trailing slash
    RewriteCond %{REQUEST_URI} !/$
    RewriteCond %{REQUEST_URI} !\.
    RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
    
    # Rewrites urls in the form of /parent/child/
    # but only rewrites if the requested URL is not a file or directory
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ index.php?page=$1 [QSA]
    
    Code (markup):
    I'm also trying to remove the trailing slash and redirect anything with a trailing slash to the file without a trailing slash but I don't know how so I left it in the htaccess file
     
    enwise, Oct 30, 2008 IP