NYCPHP Meetup

[nycphp-talk] Many pages: one script

Rob Marscher rmarscher at beaffinitive.com
Mon Aug 6 10:50:10 EDT 2007


On Aug 5, 2007, at 2:42 PM, Hans Zaunere wrote:
> AliasMatch /(.*) "/var/www/www.something.com/index.php"

http://httpd.apache.org/docs/2.0/mod/mod_alias.html#aliasmatch

I wonder why the major php frameworks don't mention this as an  
option?  It seems from the documentation that it can't go  
in .htaccess - so that may be why.  The frameworks are assuming most  
of their users are on shared servers and can't modify their httpd  
config.

If there was an existing file... say favicon.ico... would AliasMatch  
know to just serve that up instead of sending through index.php?   
That's one thing I like about the following mod_rewrite rule - if the  
file or directory exists, it won't pass it to the index.php front  
controller:
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1

-Rob



More information about the talk mailing list