Priorize /server-status front another .htaccess rewrite rules in apache2

Posted by Wiliam on Server Fault See other posts from Server Fault or by Wiliam
Published on 2012-10-15T08:56:15Z Indexed on 2012/10/15 9:39 UTC
Read the original article Hit count: 304

Filed under:
|

It's possible to priorize /server-status front another rewrite rules? For example the next ones don't let the /server-status works:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI}      !\.
RewriteRule ^.*$ index.php [NC,L]

I have to add this to the .htaccess to don't enter to the php project:

RewriteRule ^server-status$ - [L]

With mod_pagespeed of google, their statistics page works without adding them to the project .htaccess: /mod_pagespeed_statistics

https://developers.google.com/speed/docs/mod_pagespeed/configuration


My mod_status.conf:

<IfModule mod_status.c>

  <Location /server-status>
    SetHandler server-status

    Order Deny,Allow
    Deny from all

    Allow from 127.0.0.1 
    # My allowed ips here
  </Location>

</IfModule>

© Server Fault or respective owner

Related posts about apache2

Related posts about mod-status