URL Rewriting.

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Hello McFly
Regular
Posts: 12
Joined: Thu Feb 02, 2006 5:53 pm
Contact:

URL Rewriting.

Post by Hello McFly »

I set URL rewriting in the configuration of my blog, after I was told that my host supported it. However, when I did that I was unable to access the admin area of my blog. Instead the link takes me to the administrator page of my host. Both of these areas would be named "administrator"

Is there a way to change the URL rewrite function so that I get pretty URLs while searching for posts, yet have another path to differentiate between the admin areas of my host (MyphpAdmin, etc.) and the admin area of my blog.

Let me know what you guys think. I appreciate the help. I've been using serendipity for about a year now and really like the software, but I want to take driving traffic to my blog a little more seriously, so I thought this rewrite function might help a bit as far as tracking goes.

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

Re: URL Rewriting.

Post by garvinhicking »

Hi!

Which URL Rewriting option did you enable? mod_rewrite or Apache Errorhandling? You might need to talk to your server provider about this, he might have a special setup.

Your provider might need to tell you specific .htaccess rules you might need to get everything to work.

Best 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/
Hello McFly
Regular
Posts: 12
Joined: Thu Feb 02, 2006 5:53 pm
Contact:

Post by Hello McFly »

Thanks again Garvin,
I was using "mod_rewrite" but it might be just that I had no idea what I was doing? :oops:

I'll play around with it and contact my host as you suggest.

Is there a post that describes how these two methods work? My host says they support both.

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

Post by garvinhicking »

Hi!

If your host uses already mod_rewrite to direct you to special places, you will definitely need to contact him on how to adapt those rules to fit with serendipity's own rules.

The mod_rewrite URL rewriting works with RewriteRules in your .htaccess file, the Apache errorhandling URL rewriting works with a custom 404 error handler (set in .htaccess). This last method has the disadvantage that it leaves a 404 logfile entry in your apache logs. However in the end result, the are actually leading to the same index.php file which then checks which page was really requested.

HTH,
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