質問

I am trying to redirect all from non-www to www. So example.com redirects to www.example.com I enabled Rewrite Engine in Apache and added this to .htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule ^(.*) http://www.example.com/$1 [R=301]

At first look everything worked perfectly. But when trying to use my website's log in form to view areas of the site accessible only to logged in users it just appears to refresh the page. Nothing happens.

I've been trying to fix this for quite a while and haven't found any similar problems. Any help is appreciated! Thanks.

役に立ちましたか?

解決

Silly me. Somewhere I declared the website as a variable in the form of example.com. Changed it and it works now.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top