50 vues
How to create pretty urls?
Espadon

8 sujets, 13 réponses

Message non lu
Hi. I wanted know if it were possible to create friendly urls via the .htaccess file? For example, we have:

http://www.neofrag.com/members/237/espadon.html or http://www.neofrag.com/forum/14/support.html

Now I would like for it to be:

http://www.neofrag.com/profile/espadon or http://www.neofrag.com/forum/14/support

I realize if I wanted to change "members" to "profile" I would have to change the files within neofrag. But lets say I skip doing so, how could I get pretty urls?
2 participants
2 réponses
creativewild

17 sujets, 53 réponses

Contributeurs Donateurs
Message non lu
Hi @espadon,

from what I can tell from the source code, the .html extension is added and used by the route system in place, what you want to achieve is possible by rewriting the urls in the .htaccess file.

At this point is a trial-and-error approach but I will have a look into rewriting the urls to achieve what you need.
Espadon

8 sujets, 13 réponses

Message non lu
Thankyou for the reply and yes I noticed the routes system, but I was never good at understanding mod_rewrite to cover everything. Hopefully it all works out (: