Question

Is there a way to find out if a server supports mod_rewrite & .htcaccess

Was it helpful?

Solution

I'd create a test scenario by adding mod_rewrite to .htaccess. There's an example here.

OTHER TIPS

http://us3.php.net/apache_get_modules will output something similar to the following:

Array
(
    [0] => core
    [1] => http_core
    [2] => mod_so
    [3] => sapi_apache2
    [4] => mod_mime
    [5] => mod_rewrite
)

Just look for mod_rewrite. You could even write a small function using in_array() to make it easier to determine whether a given module is loaded or not.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top