URL rewriting question

Having trouble installing serendipity?
Post Reply
autotyper
Regular
Posts: 7
Joined: Sat Jan 26, 2008 12:55 am

URL rewriting question

Post by autotyper »

Hello,

my Apache webserver has mod_rewrite enabled. However, when I select "Use Apache mod_rewrite" in the design options, I get a "Page not found" error. I looked into the .htaccess file maintained by Serendipity, but no rewriting entry has been written to it. What else do I need to do for s9y to use URL rewriting?

Regards,
Andreas
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: URL rewriting question

Post by garvinhicking »

Hi!

Where do you get the "Page not found" error? When you save your configuration?

As for .htaccess - is it writable for the webserver?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
autotyper
Regular
Posts: 7
Joined: Sat Jan 26, 2008 12:55 am

Post by autotyper »

Hi,

I get this error when I click an archive link, for example. With "Disable URL rewriting" I get a normal page saying that no articles exist (which is true), but with mod_rewrite enabled I get the Apache "Page not found" message.

Yes, .htaccess is writable for the webserver.

Andreas
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

How does your .htaccess look like? Usually when you switch to "mod_rewrite" it should contain RewriteRule entries. If that is not the case, this can only happen if either .htaccess is not writable, or the files in include/tpl/ are not the ones delivered with Serendipity?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
autotyper
Regular
Posts: 7
Joined: Sat Jan 26, 2008 12:55 am

Post by autotyper »

Hi,

for some reason, URL rewriting now works. There are approx. 20 RewriteRules in the .htaccess file.

Now, there is another really ugly problem: If I try to create a new upload directory, the following message is displayed and nothing is created:
Ihr Browser hat keinen gültigen HTTP-Referrer übermittelt. Dies kann entweder daher kommen, dass Ihr Browser/Proxy nicht korrekt konfiguriert ist, oder dass Sie Opfer einer "Cross Site Request Forgery (XSRF)" waren, mit der man Sie zu ungewollten Änderungen zwingen wollte. Die angeforderte Aktion konnte daher nicht durchgeführt werden
This message is also displayed when I try to enable a plugin, for example, but in this case the action is completed despite this message.

However, currently I cannot switch off mod_rewrite because the new settings aren't stored!

Update: Using Opera instead of Firefox, I was able to switch off URL rewriting. Now the link to my static about page works again. Is this URL rewriting thing in s9y still beta, or am I just too stupid to understand it?


Andreas
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

This error message occurs if either your browser rejects cookies, or your borwse does not send a "HTTP-Referer" string. It can also hapopen if the URL you use for your backend differs frmo the URL you configured in the s9y configuration.
Update: Using Opera instead of Firefox, I was able to switch off URL rewriting. Now the link to my static about page works again. Is this URL rewriting thing in s9y still beta, or am I just too stupid to understand it?
URL rewriting actually works for everybody, I'm sure in your case it was caused by missing .htaccess privileges.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply