Reputation: 352
There's a server for which I don't have access to the control panel; I can only access a directory by FTP. I need to know if the Apache AllowOverride directive is enabled in that directory. I want to check that Apache has mod rewrite enabled and that the options allow Override All. How do I do it with a PHP script? Thanks
Upvotes: 1
Views: 618
Reputation: 3544
I don't think there's any way to do that in PHP. The only way is to put some commands into .htaccess that depend on AllowOverride and mod_rewrite, and see if you get 500 Internal Server Error when you visit the directory by web. For example, you can put
Options all
to test AllowOverride Options
,
Allow from all
to test AllowOverride Limit
, or
RewriteRule .* -
(which does nothing) to test mod_rewrite.
Upvotes: 2