Bored so yah, Ive written this tutorial on some things on .htaccess
Banning IPs
Now, I wouldn't recommend banning IPs due to you may block out more than one person (maybe thousands)
All you need to do is replace "00.00.00" with the persons IP. If you want to not allow anyone to view it, just replace the IP with all
SEO Friendly URLsCode:deny from 00.00.00
I used to use this on my vbulletin at one point, I use it quite oftenly in my coding. It can be used with $_GET to make the URL search engine friendly (plus it looks better)
So if I now typed in http://www.eg.com/anything it would load http://www.eg.com/myscript?get=anythingCode:RewriteEngine on RewriteRule ^([^/.]+)$ myscript.php?get=$1
Error pages
Error pages are very simple to make. All you need to type is "ErrorDocument (error code) /(your page)"
eg. File can not be found
For all your error codes check out w3.orgCode:ErrorDocument 404 /404.html
http://www.w3.org/Protocols/HTTP/HTRESP.html
Redirect
I personally prefer to redirect in the page using html but anyway here we go...
Code:Redirect /oldfile.html /newfile.html
I am bored of writing this now, anyway I hope this helped some people.





Reply With Quote
