Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: pty10 on December 06, 2010, 08:01:11 AM

Title: 301 redirect problem
Post by: pty10 on December 06, 2010, 08:01:11 AM
Hi guys,

Just trying to setup a 301 permanent redirection from  http://www.domainname.com.au/index.php, http://domainname.com.au/index.php to http://www.domainname.com.au  using:

RewriteCond %{HTTP_HOST} ^domainname.com.au$ [OR]
RewriteCond %{HTTP_HOST} ^www.domainname.com.au$
RewriteRule ^index\.php$ "http\:\/\/www\.domainname\.com\.au" [R=301,L]

The redirection works but I'm not able to login to the website. I get the following error:

'You need to fill in a username.'

I suspect it has to do with the guest sessions of the website

Can someone tell me how can I get around this problem and using the 301 redirection?  Am I missing something from the Rewrite or needs to be modify to something else?

Regards,

E
Title: Re: 301 redirect problem
Post by: Illori on December 06, 2010, 08:03:49 AM
is http://www.simplemachines.org/community/index.php?topic=386816 any help?
Title: Re: 301 redirect problem
Post by: pty10 on December 06, 2010, 08:06:30 AM
Will try that. Can you tell me what [NC] is or stands for?
Title: Re: 301 redirect problem
Post by: Tjati on December 06, 2010, 09:38:32 AM
Say hello to Mr. Apache Documentation:
http://httpd.apache.org/docs/2.2/en/misc/rewriteguide.html
http://httpd.apache.org/docs/2.2/en/mod/mod_rewrite.html
There you'll find your answer :)
Title: Re: 301 redirect problem
Post by: Deaks on January 04, 2011, 05:29:06 PM
pty10, as you have not updated this in a month I am going to persume that you have it solved and mark it as such, if this is incorrect please let us know what else if anything you have tried, and we will continue to assist you.