Page 2 of 4

Posted: Tue Jul 10, 2007 6:57 pm
by garvinhicking
Hi!

It could be that your permalink/path configuration is wrong. Can you please tell which paths and permalinks you setup in s9y?

Especially the base URL, the base HTTP path and the 'archives'-related permalinks would be important.

Best regards,
Garvin

Posted: Wed Jul 11, 2007 1:25 am
by shanek
Relative Path: /blog/
URL to Blog: http://www.shanekillian.org/blog/
Permalink Entry: index.php?/archives/%id%-%title%.html
Permalink Author: index.php?/authors/%id%-%realname%
Permalink Category: index.php?/categories/%id%-%name%
Path to Archives: index.php?/archives
Path to Archive: index.php?/archive
Path to Categories: index.php?/categories
Path to Search: index.php?/search
Path to Comments: index.php?/comments

Those seem to be the relevant ones.

Posted: Wed Jul 11, 2007 12:00 pm
by garvinhicking
Hi!

Remove the "index.php?/" in front of your permalinnks! They are not valid there.

Best regards,
Garvin

Posted: Wed Jul 11, 2007 2:24 pm
by shanek
Okay, I removed them, but it seems to have made no difference whatsoever. And I still have the problem of not being able to page back.

Posted: Wed Jul 11, 2007 2:44 pm
by garvinhicking
Hi!

So you now have:

Full path: /path/to/your/blog/
Relative Path: /blog/
URL to Blog: http://www.shanekillian.org/blog/
Index file: index.php
Permalink Entry: archives/%id%-%title%.html
Permalink Author: authors/%id%-%realname%
Permalink Category: categories/%id%-%name%

Path to Archives: archives
Path to Archive:archive
Path to Categories: categories

URL Rewriting: None

is that right?

Regards,
Garvin

Posted: Wed Jul 11, 2007 4:44 pm
by shanek
Yes, except that URL Rewriting is on. Should I turn it off?

When I took the index.php?/ out of archives, my server went back to sending me a Bad Request page when I clicked the next page link.

Posted: Wed Jul 11, 2007 4:47 pm
by garvinhicking
Hi!

If rewriting is on, the links would not be allowed to read "index.php?/..." and special .htaccess directives would be required to work. Your .htaccess must contain the right value for the "ErrorDocument" directive - you said it did look okay in the beginning of the thread. Maybe now is the time to paste your .htaccess contents. ;-)

So to get a URL like index.php?/archives/P2.html to work, you would need to switch off URL Rewriting, yes. Maybe you can try it out?

Best regards,
Garvin

Posted: Wed Jul 11, 2007 5:07 pm
by shanek
Before I change anything further, here's my .htaccess file:

Code: Select all

# BEGIN s9y
ErrorDocument 404 /blog/index.php
DirectoryIndex /blog/index.php

RewriteEngine On
RewriteBase /blog/
RewriteRule ^(archives/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.html) index.php?/$1 [NC,L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^ndex.php?/feeds/(.*) index.php?url=/index.php?/feeds/$1 [L,QSA]
RewriteRule ^ndex.php?/unsubscribe/(.*)/([0-9]+) index.php?url=/index.php?/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^ndex.php?/approve/(.*)/(.*)/([0-9]+) index.php?url=index.php?/approve/$1/$2/$3 [L,QSA]
RewriteRule ^ndex.php?/delete/(.*)/(.*)/([0-9]+) index.php?url=index.php?/delete/$1/$2/$3 [L,QSA]
RewriteRule ^(index.php?/admin|entries)(/.+)? index.php?url=index.php?/admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(index.php?/plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^ndex.php?/search/(.*) index.php?url=/index.php?/search/$1 [L,QSA]
RewriteRule ^ndex.php?/comments/(.*) index.php?url=/index.php?/comments/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]

<Files *.tpl.php>
    deny from all
</Files>

<Files *.tpl>
    deny from all
</Files>

<Files *.sql>
    deny from all
</Files>

<Files *.inc.php>
    deny from all
</Files>

<Files *.db>
    deny from all
</Files>

# END s9y

Posted: Wed Jul 11, 2007 5:13 pm
by garvinhicking
Hi!

Okay...I think here's the best thing to do:

1. Backup your .htaccess file somewhere safely
2. Delete the .htaccess file
3. Log in to your s9y admin panel
4. Go to the s9y configuration
5. Toggle 'URL Rewriting' to 'none'. Leave the other permalinks as we discussed earlier in this thread, without "index.php?/..."
6. Click 'SAVE'
7. Toggle 'URL Rewriting to 'mod_rewrite' again
8. This should properly re-create your .htaccess file.

Please tell me if that works! My bet is that your new server might not have mod_rewrite support and that the rules were conflicting. If you get any HTTP 500 errors or so, delete .htaccess file and leave the "URL Rewriting" setting to "None".

Best regards,
Garvin

Posted: Wed Jul 11, 2007 5:27 pm
by shanek
Well, that made things WORSE--now NONE of the links are working! They give me 404 errors!

Posted: Wed Jul 11, 2007 5:30 pm
by garvinhicking
Hi!

Great, so we found the reason: Your new host does not support mod_rewrite.

Go to the serendipity_admin.php file and set URL Rewriting to "NONE".

Regards,
Garvin

Posted: Wed Jul 11, 2007 5:45 pm
by shanek
Okay, now it's working even crazier than before!

Hitting Next Page takes you back to the first page; hitting it AGAIN gives you no entries at all!

Definitely going to contact GoDaddy about the mod_rewrite thing.

Posted: Wed Jul 11, 2007 5:57 pm
by garvinhicking
Hi!

So you now have "URL Rewriting" set to "None", and no .htaccess file exists, or how is it set?

HA! Now I see a difference! :)

One page uses ".com" and the other ".org"! Make sure you have the optiion "Autodetect HTTP-Host" enabled in your s9y configuration!

Regards,
Garvin

Posted: Wed Jul 11, 2007 6:03 pm
by shanek
Hmmm...that seems to have done the trick.

I'd still like to get mod_rewrite back, though. I've sent a message to GoDaddy. If they get it turned on I'll see if it works.

Posted: Wed Jul 11, 2007 6:07 pm
by garvinhicking
Hi!

Okay, great. Thanks for trying out so many things with me. I wasn't aware that mod_rewrite could've been the trouble. I'm sure goDaddy will be able to put that back in for you.

Best regards,
Garvin