From: Matthew M. <ma...@tu...> - 2004-11-03 21:23:31
|
> See > http://www.tutorio.com/tutorial/php-alternative-to-mod-rewrite-for-se- > friendly-urls for an example Flash overload! I like the example, and I can code support for it even though it still requires Apache. Is there a noticeable difference in speed between letting php parse the string and letting mod_rewrite compute the link? Is mod_rewrite unpopular? The site claims: "Because doing mod_rewrite on sites with a lot of pages takes up a large amount of resources." Are they programming a rewrite on a per link basis? Currently 0.9.4 has just one rule (although admittedly it is not very flexible). > Couldn't we just do this with a minor change in index.php? > > Add a stub in each module to encode / decode short urls and change each > module as we go to call the functions to convert long urls to short > ones. > > We could then even lose the index.php with a really simple mod_rewrite > or forcetype rule rather than some massive list. I'll play around with this tomorrow. How about: www.site.com/index/pagemaster/action/view/id/4 'index' remains to call the file (is there a .htaccess hack to drop this as well?). The first parameter after the index is always the module (pagemaster). Then the script pipes the remaining parameters into key/value pairs within GET and REQUEST. The moduleLink and secureLink functions can have a switch to deliver the links in this format or not automatically. -- Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 http://phpwebsite.appstate.edu http://ess.appstate.edu |