Stats provided by hosting company within /stats


I have a site running on Dreamhost and one of the things they offer is a full set of stats which they provide under your current domain; e.g. yoursite.tld/stats

Is there any way to stop Grav trying to serve /stats and producting an error and just pass this request to the underlying hosting provision?

I am also looking to see if there’s a way to move the stats page elsewhere.

Thanks for any help.

OK, ignore me… I made the issue somewhat more difficult than it really needed to be. I was looking for some clever grav routing thingie when I should have just gone back to basics.

That being adding the following within .htaccess;

RewriteBase /
RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html).*$ [NC]
RewriteRule . - [L]