1

Topic: mod rewrite www login problem

Hi there!

I am having login troubles after adding the following code to the .htacces file (bold) - example code of www.volunteering.at:

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Set next line to your Wolf CMS root - if not in subdir, then just /
  RewriteBase /

 #add www
  RewriteCond %{HTTP_HOST} !^www\.volunteering\.at$ [NC]
  RewriteRule ^(.*)$ [url]http://www.volunteering.at/$1[/url] [R=301,L]

  # Rules to allow install sequence to test for mod_rewrite support
  RewriteRule ^wolf/install/index.html$ wolf/install/index.php?rewrite=1 [L,QSA]
  RewriteRule ^wolf/install/index.php$ wolf/install/index.php?rewrite=1 [L,QSA]
  RewriteRule ^wolf/install/$ wolf/install/index.php?rewrite=1 [L,QSA]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  # Main URL rewriting.
  RewriteRule ^(.*)$ index.php?WOLFPAGE=$1 [L,QSA]

</IfModule>

Typing in Login and Pass - press enter - short loading - back to Login Pass (no warning if I type the wrong login/Pass)

I added the code on a few sites of mine. On some it´s still possible to login, on others it´s not. What I have tried is resetting the pass and salt according to this topic http://www.wolfcms.org/forum/topic1126.html which worked for me when I had login problems (not caused by adding the code above) - but it didn´t work this time.

The thing is: if i remove the above code from the .htaccess file I am (again) able to login...

Anyone having an idea what I am doing wrong?

I am using the latest version of wolfcms.

Thanks a lot!

Andreas

Thumbs up

2

Re: mod rewrite www login problem

It seems that your rule is not correct.
Try it like this:

RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

Without "www" on rewriteCond.

My Wolf CMS related blog Project 79 | Wolf CMS Docs

3

Re: mod rewrite www login problem

I changed the code like you suggested, but still I am not able to login...

Thumbs up

4

Re: mod rewrite www login problem

You also have to add change your url in config.php to http://www.volunteering.at

My Wolf CMS related blog Project 79 | Wolf CMS Docs

5

Re: mod rewrite www login problem

Cheers, works perfectly! I owe you a beer smile
Case closed.

Thumbs up

6

Re: mod rewrite www login problem

big_smile

Now you should correct your other sites too so you don't have this problem anymore.

My Wolf CMS related blog Project 79 | Wolf CMS Docs

7

Re: mod rewrite www login problem

Already done wink Have a nice one!

Thumbs up