Shorter Archive URLs?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
boone
Regular
Posts: 16
Joined: Sat Jan 17, 2004 3:09 am
Contact:

Shorter Archive URLs?

Post by boone »

Is is easy to shorten the archive URLs that S9Y uses?

I'd prefer this:
http://boonedocks.net/mike/index.php?/a ... River.html

To be this:
http://boonedocks.net/mike/index.php?/archives/25.html

Or:
http://boonedocks.net/mike/index.php?/25

If this is only possible by hacking the code, please let me know which files I should be editing.

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

Re: Shorter Archive URLs?

Post by garvinhicking »

[quote="boone"]Is is easy to shorten the archive URLs that S9Y uses?]/quote]

Well, it's a quick hack. Open your serendipity_functions.inc.php - find the function serendipity_archiveURL() which does what you want.

You may need to adjust the file serendipity_config.inc.php and all the PAT_* constants. They define the RegEx patterns to recognize the true URL.

However, you should note that doing so you will vastly degrade google indexing for your entries and easy recognition of your URL from other users. I don't suggest you to change this intended behaviour...

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