Cant login after .htaccess redirect
Cant login after .htaccess redirect
I redirected "site.com" to "www.site.com" and now It won't let me log in.. is there anyway to fix this?
Re: Cant login after .htaccess redirect
I tried clearing cookies and also the cache and it still doesn't work.
My htaccess file
My htaccess file
Code: Select all
Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site\.net$ [NC]
RewriteRule ^(.*)$ http://www.site.net/$1 [L,R=301]
# 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]
Re: Cant login after .htaccess redirect
Hmmm... not CMSms specific... shouldn't be asked in these forums but on Apache's.
RewriteCond %{HTTP_HOST} ^site\.net$ [NC]
is my suspect.
I'd rather
RewriteCond %{HTTP_HOST} !www\.site\.net$ [NC]
Pierre M.
RewriteCond %{HTTP_HOST} ^site\.net$ [NC]
is my suspect.
I'd rather
RewriteCond %{HTTP_HOST} !www\.site\.net$ [NC]
Pierre M.
Re: Cant login after .htaccess redirect
Thx 4 the help Pierre! I changed it to what you suggested and still doesn't work..
Is there something else other than the htaccess I should change that will help me with this? Maybe an admin file or something in the config.php file? I've tried logging in with computers that never accessed my site so there shouldnt be any problems with cache/cookies which is what I thought the problem was.

Re: Cant login after .htaccess redirect
I had the same problem, i solved it by editing one line in the config.php file.
At approximately line 74 (at least it was in my config.php file), i changed the follwing:
to:
afterwards i could login again 
At approximately line 74 (at least it was in my config.php file), i changed the follwing:
Code: Select all
$config['root_url'] = 'http://site.net';
Code: Select all
$config['root_url'] = 'http://www.site.net';

Re: Cant login after .htaccess redirect
Yes, when you somewhat "move" the site you must reflect the changes in the config.php.
Pierre M.
Pierre M.