.htaccess tips of the day
Posted: Sun 03 Mar 2013 2:48 pm
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
End of public service announcement.
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
End of public service announcement.