Page 1 of 1

mod_rewrite

Posted: Wed Dec 07, 2016 2:29 am
by Imajica
Evening Folks,

I found where to set up mod_rewrite but I want to clean up the format of the links a little
ie: link to a particular post is

Code: Select all

http://www.notmywebhost.com/archives/351-A-New-Favorite.html
and I want it to look like:

Code: Select all

http://www.notmywebhost.com/archives/A-New-Favorite.html
or

Code: Select all

http://www.notmywebhost.com/A-New-Favorite.html
likewise categories like:

Code: Select all

http://www.notmywebhost.com/categories/22-Artists
I would like to be

Code: Select all

http://www.notmywebhost.com/categories/Artists
or

Code: Select all

http://www.notmywebhost.com/Artists
since I am very new to this platform I have to ask if this is possible with Serendipity

Thanks
John

Re: mod_rewrite

Posted: Wed Dec 07, 2016 10:04 am
by yellowled
Imajica wrote:I have to ask if this is possible with Serendipity
Technically, it is possible (there's a “but” coming up, though) to set this in Settings/Configuration → Permalinks. (Also see the docs on permalink configuation.)

Here's the “but”: You want to remove what we call the unique article ID, and that is not recommended because it speeds up the performance of your blog.
[…] you should try to use the %id% value where possible to prevent Serendipity from querying the database to lookup the target URL.
Meaning, the number that you would like to remove is a unique identifier for each article which prevents s9y from having to look up the article in the database, which is quite ”expensive”. Along the way, it also prevents you from accidentally creating article with the exact same URL (since there's always a unique component in your URLs).

YL

Re: mod_rewrite

Posted: Wed Dec 07, 2016 5:30 pm
by Imajica
that is a perfectly reasonable explanation and I will accept your advice

Thanks
John