Page 1 of 1

.htaccess tips of the day

Posted: Sun 03 Mar 2013 2:48 pm
by steve
1. It's a good idea to put comments in your .htaccess file so that you can remember in future why you added a particular line
2. Comments in .htaccess files are lines starting with the # character
3. You cannot put a # character on the end of a line and expect that the rest of the line will be treated as a comment, for example

deny from 212.113.32.0/19 #various bad bots at DataCenter, Ukraine

The whole of the line above is interpreted as part of the command. You need to put the comment on separate line:

#various bad bots at DataCenter, Ukraine
deny from 212.113.32.0/19

4. People in Austria can now access the forum :oops:

End of public service announcement.

Re: .htaccess tips of the day

Posted: Sun 03 Mar 2013 3:00 pm
by mcrossley
And the Wiki .htaccess has... ? ;)

Re: .htaccess tips of the day

Posted: Sun 03 Mar 2013 3:15 pm
by steve
Whoops, yes, fixed there too.

I've been thinking recently about getting some VPS hosting, or even dedicated (but Dreamhost seems to be behaving again now), but you're very much more on your own with those. And things like this make me think again... :lol:

Re: .htaccess tips of the day

Posted: Sun 03 Mar 2013 6:39 pm
by duke
Already looking forward to the next 'tip of the day'. :)