INCLUDE_DATA

myBLOG.com.np

get & learn something new each day…

.htaccess Tutorial – Directory Listing

  • Filed under: Tutorials
Thursday
Aug 30,2007

When a web browser is pointed to a directory on your web site which does not have an index.html file in it, the files in that directory can be listed on a web page.

Read more »

Blocking users/sites by referrer

  • Filed under: Tutorials
Friday
Jul 13,2007

Blocking users or sites that originate from a particular domain is another useful trick of .htaccess. Lets say you check your logs one day, and see tons of referrals from a particular site, yet upon inspection you can’t find a single visible link to your site on theirs. The referral isn’t a “legitimate” one, with the site most likely hot linking to certain files on your site such as images, .css files, or files you can’t even make out. Remember, your logs will generate a referrer entry for any kind of reference to your site that has a traceable origin. Before I get to the code itself, it’s important to note that blocking access by referrer in .htaccess requires the help of the Apache module mod_rewrite to make out the referrer first. This module is installed by default on most servers (ask your host if you’re not sure). So, to deny access all traffic that originate from a particular domain (referrers) to your site, use the following code:

Read more »

Archives

Languages

English flagItalian flagKorean flagChinese (Simplified) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flag
Arabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroatian flagDanish flagFinnish flag
Hindi flagPolish flagRomanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flag
Latvian flagLithuanian flagSerbian flagSlovak flagSlovenian flagUkrainian flagVietnamese flag  
By N2H