Making URL's Friendly

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
garytaylor
Posts: 2
Joined: Thu Aug 03, 2006 7:22 pm

Making URL's Friendly

Post by garytaylor »

hi,
We would like to change the urls's used on the site to improve search engine rankings for all blog articles and have looked at using the mod_rewrite functionality.
However, I know nothing about it and would appreciate any help from someone who has been there and done that.
I am competent technically with linux servers etc.. I am using apache on a linux server to which I have root access.

Any help greatly appreciated

Thanks

Gary
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

mod_rewrite allows us to use understandable names for articles and such. If it's enabled, we write rules into the .htaccess file that redirect certain URL patterns to URLs that the software can understand. For instance, articles/01-Nicely-Named-Article.html would get internally, invisibly changed to index.php?entry=01.

If you enable mod_rewrite in the Serendipity config and the server, everything should go smoothly. You can change the patterns in the Serendipity config for "paths". You won't have to manually modify your .htaccess at all. Try to leave the %id% in the path, so we can quickly look up your articles.

If you'd like to have more control over article names, you can also install the permalink plugin (I believe it's called Custom Permalinks for Entries). Then when you edit the entry, you can assign it any URL you want (within the Serendipity directory, of course).
Judebert
---
Website | Wishlist | PayPal
garytaylor
Posts: 2
Joined: Thu Aug 03, 2006 7:22 pm

Post by garytaylor »

Thanks judebert for your help.
One further question. Should I just be able to enable mod_rewrite in s9y and everything should be ok ? The reason i ask is that I tried that yesterday and whenever I clicked on an article header it came up with the url was not found. However, I did not check that mod_rewrite was enabled on the web server doh.. I guess I should check that now.

Thanks

Gary
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Pretty much, yes. With mod_rewrite enabled, all your old URLs (the ones with index.php?whatever) should still work, but you can also use nicer human-readable ones, too.

Yes, if the server doesn't have mod_rewrite enabled, S9Y can't use it. You'll also want to make sure S9Y can write its .htaccess file to its directory. Verify that it doesn't exist yet, and if it does, make sure it's writeable for the web server.
Judebert
---
Website | Wishlist | PayPal
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

Post by hgoor »

You might want to read this post as well:

http://www.s9y.org/forums/viewtopic.php?t=6324

I had some same problems and took some time to find out how and what...

I should add that my solution isn't 100% working yet, because now EVERY url that I use just point to my root, so there are probably some settings per directory settings you need to enable too...
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
Post Reply