开发者

mod_rewrite before of after developing application

I am trying to better understand how to incorporate mod_rewrite into a web applications development life cycle.

The question I am trying to understand is:

  1. Do y开发者_StackOverflow中文版ou build your application and then setup mod_rewrite after the fact?

  2. Is it more appropriate to consider mod_rewrite along the way while you develop your application?


mod_rewrite is a substantial part of your application. If it doesn't handle just trivial requests, but for example establishes a front controller, then of course you have to have planned your application structure to know what mod_rewrite is supposed to do.


Whenever I'm building an application - first thing what I do is to redirect any /foo/bar/ or /foo/bar.html into a PHP index.php?path=foo/bar. More detailed setup ( for example for images etc. ) I do when I need it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜