Im tring to find out how to write a php script to check for mod_rewrite.
Can i get some help with this.
Thanks
Im tring to find out how to write a php script to check for mod_rewrite.
Can i get some help with this.
Thanks
let me explain it better,
Im tring to write a php script to check apache server to see if mod_rewrite is a loaded module on the server.
maybe this is a lil bit better
michael
I don't think that this is possible because all your rewrites happens in the .htaccess file or in the http.conf file There is no direct connection
rewrites DO happen at the .htaccess level, but who says you can't check from PHP? :-)
if( in_array("mod_rewrite", apache_get_modules()) ) echo "You've got it, baby";
note that I looked @ phpinfo() to see if this was possible-- in general, if you can see it in phpinfo() then there's probably a way to fetch it programatically.
E
the use of "apache_get_modules()" works only if php runs as a module. But it's also possible to use mod_rewrite in cgi-mode.