The PHP alternative to apache’s mod_rewrite
PHP mod_rewrite 1.0
Keep in touch with updates and subscribe to
If you have a mod_rewrite using web-project and your server doesn’t support mod_rewrite you should usually turn the friendly urls in your documents into “ugly ones”, and this could take time :/
with the php mod_rewrite you could skim over this workings
just set your ErrorDocument 404 in the .htaccess to the PHP file which is using modrewrite.class.php and this should do the work
A list of things you could do with this class can be found under http://envato.homac.at/demos/PHPModRewrite/, there’s also a link to a version of SGM2.0 which is running with php mod_rewrite instead of using apache’s mod_rewrite php mod_rewrite doesn’t support all features of apache’s mod_rewrite but you really can use a lot of known rules
I’m thankful for your inputs
> This class simulates the work of apache’s mod_rewrite function >It could be used for servers where the mod_rewrite function isn’t enabled >The .htaccess or another mod_rewrite rules containing file will be parsed by this class usuallly SEO-friendly URLs will return a 404 when mod_rewrite isn’t work – but this class works >within the 404 target and simulates the friendly urls, so you don’t have to correct your paths
Requirements
possibilty to set ErrorDocument 404 for your webserver
Future plans
Adding possibility to define rules and rewritebase within the class/error doument. So you don’t have to use an external file, if you don’t want to
I hope you like it mac