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
How to build in pretty_url
Re: How to build in pretty_url
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
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:
Code: Select all
%cat_name%/%item_name-%item_id%/
/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
How do I implement this in my .htaccess??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:Code: Select all
%cat_name%/%item_name-%item_id%/
/categoryname/item-name-5/