On Mar 19, 2007, at 10:46 AM, Donald J Organ IV wrote:

P.S. mod_rewrite is usually enabled or can be enabled on any simple hosting plan that is using apache, if you encounter a host that uses apache and wont turn it on, i would suggest finding another host.

Also, you can usually put mod_rewrite rules in a .htaccess file -- so it doesn't require httpd.conf access.

Even without mod_rewrite, you could still do myhost.com/index.php/ MayEvent07 -- you then look at $_SERVER['REQUEST_URI'], remove index.php/ from it, and then explode on / to get your args.

Even if you are able to use mod_rewrite, you probably need to do a database lookup to find MayEvent07 so your mod_rewrite rule would be something like this:

RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css|html|htm|xml|php)$ index.php

Then you still process it by exploding $_SERVER['REQUEST_URI'] but you won't have index.php in that string. The rewrite rule forwards everything to index.php except for files with the extensions listed.
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to