Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Hosting Requirements

What you need to consider when choosing a hosting provider and plan.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

.htaccess rules to make SS ignore a URL


6 Posts   1423 Views


20 October 2010 at 9:01pm Community Member, 24 Posts

Hey guys,

So i've deployed a site to an un-managed VPS and am just going through the process of getting everything runnig. Have SS up and running so far without a hitch, everyhting feel fast etc. Have just finished doing some security stuff to the server and am now onto setting up AWStats. I have AWSTats up and running as far as I can tell, the problem is that I need it to respond to domain.tld/ask_statz (made weird to try and through the script kiddies). How do I make SS ignore that one url? I'm assuming it's to do with intercepting the request @ htaccess before it gets sent through the sapphire maze.

If anyone could help that would be really awesome.



20 October 2010 at 10:27pm Community Member, 901 Posts

Is ask_statz a folder? If yes, it's probably best to place a new .htaccess file there where you add the following:

<IfModule mod_rewrite.c>
   RewriteEngine Off

This will override any previous rules from other .htaccess files.


21 October 2010 at 9:01am Community Member, 24 Posts

The ask_statz isn't a folder. AWStats is a server statistics package written in perl and installed outside the /srv/www directory. at the moment i've got .htaccess in /etc/awstats which supposedly works for others (i'm using it to password protect the stats)
but SS is still getting the request as far as i can tell. I'm assuming that .htaccess gets processed before the main.php bootstrapper? If i just add some sort of rule that makes htaccess not send /ask_statz/ to the bootstraper will that work?


21 October 2010 at 8:11pm Forum Moderator, 5511 Posts

You can add this condition to the .htaccess file

RewriteCond %{REQUEST_URI} !^/foldername/.*


22 October 2010 at 3:18pm Community Member, 24 Posts

Tried that, still no luck.


22 October 2010 at 5:23pm Forum Moderator, 5511 Posts

Where did you add that line? that line should ignore it. Perhaps try RewriteCond %{REQUEST_URI} !^/foldername so it includes the /foldername as well.