50 Ansichten
How to create pretty urls?
Espadon

8 Fach, 13 Antworten

Ungelesene Nachricht
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 Teilnehmer
2 Antworten
creativewild

17 Fach, 53 Antworten

Mitwirkende Geber
Ungelesene Nachricht
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 Fach, 13 Antworten

Ungelesene Nachricht
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 (: