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


Reply


6 Posts   1494 Views

Avatar
te_chris

Community Member, 24 Posts

20 October 2010 at 9:01pm

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.

Chris

Avatar
banal

Community Member, 901 Posts

20 October 2010 at 10:27pm

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
</IfModule>

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

Avatar
te_chris

Community Member, 24 Posts

21 October 2010 at 9:01am

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?

Avatar
Willr

Forum Moderator, 5513 Posts

21 October 2010 at 8:11pm

You can add this condition to the .htaccess file

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

Avatar
te_chris

Community Member, 24 Posts

22 October 2010 at 3:18pm

Tried that, still no luck.

Avatar
Willr

Forum Moderator, 5513 Posts

22 October 2010 at 5:23pm

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