1 Vote Vote

URL Rewriting In PHP MVC Framework

Posted by topdog 261 days ago Questions| php framework mvc All

Hello there,

I have made my own custom php framework which implements MVC design pattern. In it, all URLs are constructed like this

mysite.com/index.php?route=controller/function/parameters/go/here mysite.com/index.php?route=products/shirts/99

etc

I have put in place htaccess to remove index.php?route= part from URLs to make them more SEF making them appear like this:

mysite.com/controller/function/parameters/go/here

mysite.com/products/shirts/99

I just want to append a suffix at the end of each URL like so:

mysite.com/controller/function/parameters/go/here.html

mysite.com/products/shirts/99.html

Probably htaccess can be put to use for acheiving that or possibly some other solutions.

Any ideas please?

Thanks in advance.

Discuss Bury


Who Voted for this Question