Page 1 of 1
Cant login after .htaccess redirect
Posted: Wed Oct 29, 2008 6:14 am
by JaymeNYC
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
Posted: Wed Oct 29, 2008 5:56 pm
by JaymeNYC
I tried clearing cookies and also the cache and it still doesn't work.
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
Posted: Wed Oct 29, 2008 8:58 pm
by Pierre M.
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.
Re: Cant login after .htaccess redirect
Posted: Wed Oct 29, 2008 9:48 pm
by JaymeNYC
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
Posted: Thu Oct 30, 2008 8:15 pm
by Pierre M.
Try Apache's Rewritelog.
Re: Cant login after .htaccess redirect
Posted: Tue Nov 04, 2008 9:21 pm
by zircle
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:
Code: Select all
$config['root_url'] = 'http://site.net';
to:
Code: Select all
$config['root_url'] = 'http://www.site.net';
afterwards i could login again

Re: Cant login after .htaccess redirect
Posted: Thu Nov 06, 2008 4:13 pm
by Pierre M.
Yes, when you somewhat "move" the site you must reflect the changes in the config.php.
Pierre M.