Loading Please wait...

MVC Url Rewriting

Zigmoyd Offers a feature very similer to Url rewrite on the top of MVC which can easily be done without requiring any hassle on the server software. e.g. it will be doen on Zigmoyd and there is no interaction of server software (apache or IIS) in this rewrite Operation.

MVC rewrite Engine is maintained by a configuration file on your project's etc/conf.d directories mvc.rewrite.php File. rewrite rules are written as following.

/source -> /destination
You can even use regular expression in it.
/admin -> /admin/browse
/u:(\w+) -> /user/profile/$1
Now ehenever the user goes to
http://server/zigmoyd/admin 
he/she is internally redirected to
http://server/zigmoyd/admin/browse 
whenever the user goes
http://server/zigmoyd/u:Neel 
zigmoyd will redirect him to
http://server/zigmoyd/user/profile/Neel 

Now if user tries

http://server/zigmoyd/u:Neel/arg 
it will become
http://server/zigmoyd/user/profile/Neel/arg 

But the user is completely anaware about this redirection. the user just see's the url he/she has typed. The end user doesn't know (There is no mathematical backdoor to know) what redirection is going on internally.


Generated on Mon Oct 27 23:51:59 2008 for zigmoyd.kdevelop by doxygen 1.5.6