Page 1 of 1
How to build in pretty_url
Posted: Thu May 21, 2009 8:01 pm
by Duketown
Hi,
There are a couple of requests for my modules, to have them write pretty_urls. Where can I find an example of that.
I've seen the News version. Is there maybe another example of coding without the 'autodiscoverylink' part?
Thanks in advance,
Duketown
Re: How to build in pretty_url
Posted: Sat May 23, 2009 6:25 am
by viebig
I usually use htaccess to create prettier urls.
I put an option at the module like: Use mod_rewrite
then with a couple on line added to htaccess you can generate the the way you want. Not to easy for the user to setup because requires editing the .htaccess, but more flexible and light than process everything with PHP.
You can even generated the needed .htaccess addition, so basically it will be copy and paste.
Further, you can implement a flexible way to create urls, like: an user input:
then for example your module generated a code links like:
/categoryname/item-name-5/
parsing the scheme you can generate some mod_rewrite codes.
I hope that is useful, since it's a non-standard way.
Regards
G
Re: How to build in pretty_url
Posted: Tue Oct 06, 2009 8:57 am
by bob_basli
viebig wrote:
Further, you can implement a flexible way to create urls, like: an user input:
then for example your module generated a code links like:
/categoryname/item-name-5/
How do I implement this in my .htaccess??