Topic: Having terrible trouble getting clean URLs to work

I've been trying to get WolfCMS to install with clean URLs on my hosting.

I'm installing in the root of my domain, I've:

  • removed the underscore from _.htaccess

  • set the rewritebase to /

  • checked that the installer sets rewrite as 'true'

  • tried various combinations of commenting on the first three server configuration lines in .htaccess

  • tried the advice in this thread: http://www.wolfcms.org/forum/topic404.html

For most combinations of the above, I just get a 500 error when trying to run the install.  For the combinations that work, the install appears to run OK, but when I try to log in, nothing happens - it just clears the username and password fields.

I'm on shared linux hosting with 1and1 (which I understand is a problem in some cases - nonstandard configuration).

Test installs without clean URL configuration have worked OK for me, but I really need clean URLs, so I can use the Aliases or Redirector plugins.  (I also wasn't able to get either of those working, but I think that's probably the same problem as above).

Any advice gratefully received.  If I've omitted some pertinent detail, please ask.

Thumbs up

Re: Having terrible trouble getting clean URLs to work

Well its allways usefull to show us the current content of your .htaccess

Re: Having terrible trouble getting clean URLs to work

Sorry - yes.

It looks like this at the moment(somewhat moot, as I've tried a few different configurations):

AddType x-mapp-php5 .php .php3 .php4 .htm .html
#
# Setting Wolf CMS requirements
#
# On some server configurations you may need to comment out one or more of
# the three lines below due to server limitations.
#

# php_flag magic_quotes_gpc off
# AddDefaultCharset UTF-8
# Options -Indexes +FollowSymLinks

#
# Setting rewrite rules
#

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

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

</IfModule>

The admin login gives me a 500 error.  The site itself loads up with the standard post-install demo, but although clicking on the links loads the right URLs in the address bar, the page doesn't change off of the home page view.

Thumbs up

4

Re: Having terrible trouble getting clean URLs to work

Atomic_Shrimp wrote:

... I'm on shared linux hosting with 1and1 (which I understand is a problem in some cases - nonstandard configuration). ...

I know you've been very thorough in researching this issue in the Wolf forums -- exemplary, really.

Have you raised a support ticket with 1and1? (Have they moved off PHP4 yet? wink)  Is there a conflicting .htaccess file somewhere else on the "path"?

Using Wolf CMS professionally and for profit? Please consider supporting Wolf financially. Thanks!

Re: Having terrible trouble getting clean URLs to work

Have you checked if your server even has mod_rewrite module!?

My Wolf CMS related blog Project 79 | Wolf CMS Docs

Re: Having terrible trouble getting clean URLs to work

David wrote:
Atomic_Shrimp wrote:

... I'm on shared linux hosting with 1and1 (which I understand is a problem in some cases - nonstandard configuration). ...

I know you've been very thorough in researching this issue in the Wolf forums -- exemplary, really.

Have you raised a support ticket with 1and1? (Have they moved off PHP4 yet? wink)

Thanks - I haven't contacted them yet (not terribly confident they'll be any use, based on past experience of asking them to delete an unmovable file - they asked me to give them my administrative password by email.  I probably should look at moving to a different host, really, but it's the notion of trying to organise that without a break in site availability that scares me, as they also handle my domain registration for me.)

They're on PHP 5.2.

Is there a conflicting .htaccess file somewhere else on the "path"?

Shouldn't be, I *think*.  My existing site has one in the root of my web space, but I'm installing Wolf in a subfolder of that space and pointing the test domain directly to the subfolder (so the subfolder *is* the root for the test domain) - as I understand it, the web server for the test domain shouldn't even be able to see the other .htaccess file that exists one level above its own root.

Thumbs up

Re: Having terrible trouble getting clean URLs to work

jackie wrote:

Have you checked if your server even has mod_rewrite module!?

It does, because I'm using it to prevent image leeching on my main site, but I recall that being a proper nuisance to set up, due to some nonstandard server config or other.

Thumbs up

Re: Having terrible trouble getting clean URLs to work

I think the solution might actually entail:

Buy some hosting elsewhere
Forward my test domain to the new hosting (I can do this in the 1and1 cpanel)
Spend some time transferring my site content to the new Wolf install (on the new hosting)
Forward my live domains to the completed new CMS
End my hosting contract with 1and1

Thumbs up

Re: Having terrible trouble getting clean URLs to work

If you have this much trouble with a hosting provider that might be useful.

However, if an install without clean urls works correctly then in theory it should work with clean urls too... The error 500 usually (except when mod_security is used) means that the server choked on some config. Try it with a "non functioning" htaccess file and start adding lines from there to see on which one it chokes. (if you still want to try)

Like this: (assuming the first line is needed for selecting the proper php version in your hosting account)

AddType x-mapp-php5 .php .php3 .php4 .htm .html
#
# Setting Wolf CMS requirements
#
# On some server configurations you may need to comment out one or more of
# the three lines below due to server limitations.
#

#
# Setting rewrite rules
#

<IfModule mod_rewrite.c>
  RewriteEngine On

</IfModule>
Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

Re: Having terrible trouble getting clean URLs to work

I absolutely want to try.  I'll start over with a non-clean URL installation, then post back.

(not sure the first line *is* required - I was pretty much clutching at straws when I added that, based on someone else's described problems with my host.  PHP 5 is the default)

Last edited by Atomic_Shrimp (2012-05-01 20:27)

Thumbs up

Re: Having terrible trouble getting clean URLs to work

Atomic_Shrimp wrote:

(not sure the first line *is* required - I was pretty much clutching at straws when I added that, based on someone else's described problems with my host.  PHP 5 is the default)

Then try removing the first line too.. that might very well be the problem.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

Re: Having terrible trouble getting clean URLs to work

Well, this is really weird - I just wiped down the folder, dropped all the tables in the DB and did a new install, leaving it as non-clean URLs, and I still can't get past the login dialog - I enter the username and password, and it just clears them and stays on the login dialog.

Is there any way for any of the settings in an .htaccess file to effect persistent changes on the server (i.e. after the file is gone)?

Thumbs up

Re: Having terrible trouble getting clean URLs to work

Does it give a red error message? If no, then you might have a sessions problem... check the forum (its 01:22 here so I'm not too sharp right now wink )

Are you on a cloud host? Sometimes it can take a while (seconds to one or two minutes) for files to be cleared.

Otherwise I don't think it can be "cached"..

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

Re: Having terrible trouble getting clean URLs to work

No error message - just what seems like a page refresh.

However, I just tried logging in from a different computer this morning and I can get into the admin interface just fine - I guess that either means something at the host end has taken a while to propagate/update, or maybe that the PC I was using last night has just cached a broken version of something.

I'm on shared Linux hosting with 1and1  - but not sure how their architecture works beyond that.

I'll try again from home tonight and if it won't log in, I'll try clearing caches, in-private browsing and alternative browsers - it looks likely that there has been some sort of transient or local confounding issue here.

I'm truly grateful for your advice and attention on this matter.  I'll keep posting updates as more facts emerge...

Thumbs up

Re: Having terrible trouble getting clean URLs to work

Well, this is really weird.  Back at home, I can log into the admin interface of my test site, but only using Chrome.

If I try to log in using IE or Firefox (even after clearing all the temporary data, or starting a private browsing session), it just clears the username and password fields and does not log in.

What does this mean?

Thumbs up

Re: Having terrible trouble getting clean URLs to work

Can I can test a login on your testsite?
If so send me login details in private.
I use Firefox en Chromium.

Re: Having terrible trouble getting clean URLs to work

Thanks - sent you a PM

Thumbs up

Re: Having terrible trouble getting clean URLs to work

Curious little problem you have here. smile What did Fortron's testing point out? Same problem?

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

Re: Having terrible trouble getting clean URLs to work

Tis indeed interesting.

Fortron had similar problems to me (although intermittently, it seems) - sometimes it would log in, on one occasion, it gave an error "too many redirects".

I still reckon something weird was happening on the web server, so I'm in the process of moving to a new host now (fatcow) - my hosting is set up and at the moment, my test domain is just pointed at the new name servers (it'll be moved to a different registrar in due course).

First time I tried installing Wolf on the new hosting, I had the same problem as before - so I wiped the whole browser cache and it seems OK now.  It may be that wiping the cache would have made it start working again on the previous host, but it's a done deal now (and my new package is better anyway).

Haven't tried installing any plugins yet, but hopeful it will just work this time...

Thumbs up

Re: Having terrible trouble getting clean URLs to work

Hmm... wouldn't know why wiping a browser cache would solve the issue. That would just clear the HTML, Javascript and such but not even the cookies would be cleared I think.

Let us know how things fare.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

Re: Having terrible trouble getting clean URLs to work

Not sure - maybe there was also some sort of weird server-side caching in place to reduce processor load.  None of the problems are manifesting any more on the new host - and clean URLs seem to work OK now.

Still can't get the Alias or Redirector plugins to work though...

Thumbs up

Re: Having terrible trouble getting clean URLs to work

Not really familiar with the alias and redirector plugins myself I'm afraid... try asking in the relevant forum threads in the 3rd party plugins forum. smile

Good to hear that the core appear to work normally for you though.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

Re: Having terrible trouble getting clean URLs to work

I had the same problem (http 500 errors once htaccess file has been renamed), which brought me to this thread.

The cause of my problem was the "AddDefaultCharset UTF-8" line in the htaccess file. I guess my version of apache doesn't like it. I simply commented it out (with a '#') and everything works now.

Apologies if the OP's problem is caused by something different, but I thought that other people might find this thread like I did.

If I find out more details, I'll add them later.

24

Re: Having terrible trouble getting clean URLs to work

I'v also had some trouble getting the clean URLs to work on my local WAMP server. I've been reading the forum, wiki and install description a hundred times trying every tip I found, but I missed the most obvious solution.. Checking if the Mod_Rewrite was enabled in apaces httpd.conf file wink

Just thought it could be useful for other dummy's also searching for help smile

Thumbs up