Some .htaccess Tricks

23 replies
  • WEB DESIGN
  • |
Hey there,

here are some of my .htaccess tricks I am using on some sites:

Code:
# disallow reading of htaccess
<Files .htaccess>
Order Allow,Deny
Deny from All
</Files>

# Prevent Hotlinking images and files and route those people to another website
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?yourdomain.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png|zip|rar|tar|gz|txt)$ http://www.redirecttodomain.com/ [L]

# deny user agents like safersurf and amazonaws (anonymous proxies)
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} .safersurf. [NC,OR]
RewriteCond %{HTTP_USER_AGENT} .amazonaws. [NC]
RewriteRule ^(.*)$ - [F]

# deny proxies
RewriteEngine On
RewriteCond %{HTTP:VIA}                 !^$ [OR]
RewriteCond %{HTTP:FORWARDED}           !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA}       !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR}     !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION}    !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION}   !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP}      !^$
RewriteRule ^(.*)$ - [F]

# deny domain access to spammers and other scumbags
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} almaden [OR]
RewriteCond %{HTTP_USER_AGENT} ^Anarchie [OR]
RewriteCond %{HTTP_USER_AGENT} ^ASPSeek [OR]
RewriteCond %{HTTP_USER_AGENT} ^attach [OR]
RewriteCond %{HTTP_USER_AGENT} ^autoemailspider [OR]
RewriteCond %{HTTP_USER_AGENT} ^BackWeb [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bandit [OR]
RewriteCond %{HTTP_USER_AGENT} ^BatchFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^Buddy [OR]
RewriteCond %{HTTP_USER_AGENT} ^bumblebee [OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^CICC [OR]
RewriteCond %{HTTP_USER_AGENT} ^Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Copier [OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DA [OR]
RewriteCond %{HTTP_USER_AGENT} ^DIIbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo\ Pump [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Wonder [OR]
RewriteCond %{HTTP_USER_AGENT} ^Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^Drip [OR]
RewriteCond %{HTTP_USER_AGENT} ^DSurf15a [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EasyDL/2.99 [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} email [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FileHound [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} FrontPage [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetSmart [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^gigabaz [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go\!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^gotit [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^grub-client [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} ^HTTrack [OR]
RewriteCond %{HTTP_USER_AGENT} ^httpdown [OR]
RewriteCond %{HTTP_USER_AGENT} .*httrack.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ia_archiver [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^Indy*Library [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^InternetLinkagent [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^InternetSeer.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^Iria [OR]
RewriteCond %{HTTP_USER_AGENT} ^JBH*agent [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^JustView [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^LexiBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^lftp [OR]
RewriteCond %{HTTP_USER_AGENT} ^Link*Sleuth [OR]
RewriteCond %{HTTP_USER_AGENT} ^likse [OR]
RewriteCond %{HTTP_USER_AGENT} ^Link [OR]
RewriteCond %{HTTP_USER_AGENT} ^LinkWalker [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mag-Net [OR]
RewriteCond %{HTTP_USER_AGENT} ^Magnet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^Memo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mirror [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*Indy [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*NEWT [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla*MSIECrawler [OR]
RewriteCond %{HTTP_USER_AGENT} ^MS\ FrontPage* [OR]
RewriteCond %{HTTP_USER_AGENT} ^MSFrontPage [OR]
RewriteCond %{HTTP_USER_AGENT} ^MSIECrawler [OR]
RewriteCond %{HTTP_USER_AGENT} ^MSProxy [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetMechanic [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} ^Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^Openfind [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^Ping [OR]
RewriteCond %{HTTP_USER_AGENT} ^PingALink [OR]
RewriteCond %{HTTP_USER_AGENT} ^Pockey [OR]
RewriteCond %{HTTP_USER_AGENT} ^psbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^Pump [OR]
RewriteCond %{HTTP_USER_AGENT} ^QRVA [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^Reaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Recorder [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Scooter [OR]
RewriteCond %{HTTP_USER_AGENT} ^Seeker [OR]
RewriteCond %{HTTP_USER_AGENT} ^Siphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^sitecheck.internetseer.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SlySearch [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^Snake [OR]
RewriteCond %{HTTP_USER_AGENT} ^SpaceBison [OR]
RewriteCond %{HTTP_USER_AGENT} ^sproose [OR]
RewriteCond %{HTTP_USER_AGENT} ^Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^Szukacz [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^URLSpiderPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^Vacuum [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb[Bb]andit [OR]
RewriteCond %{HTTP_USER_AGENT} ^webcollage [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebHook [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebMiner [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebMirror [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^Whacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^x-Tractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xenu [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.* - [F,L]
Have fun using it

Michael
#htaccess #tricks
  • Profile picture of the author KingRoyal
    Thanks man, always useful!
    {{ DiscussionBoard.errors[7764207].message }}
  • Profile picture of the author nodesolomon
    oh thank you very much for that, thats the most part that i hate about php development is dealing server request on apache side and.htaccess files, but thanks
    Signature

    read my collection of Famous Quotes
    Free Online Movies

    {{ DiscussionBoard.errors[7764209].message }}
    • Profile picture of the author Michael71
      Yeah, I know what you are talking about... but I can handle Apache pretty well

      I am sure I have some more on my hdd's ... will have a look

      Originally Posted by nodesolomon View Post

      oh thank you very much for that, thats the most part that i hate about php development is dealing server request on apache side and.htaccess files, but thanks
      Signature

      HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
      ---
      Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

      {{ DiscussionBoard.errors[7764254].message }}
  • Nice post Michael!
    Signature
    Outsource to the experts...

    We customize your Blog, eBook, Press Release and Sale Copy content with your message.

    {{ DiscussionBoard.errors[7764491].message }}
  • Profile picture of the author Michael71
    Denying some of the "bad bots" will save you a lot of bandwidth... I have tested it
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7765658].message }}
    • Profile picture of the author michaelrox27
      Thanks for sharing this code. I have to redirect my website from www to without www, so it will be a great help for me.
      {{ DiscussionBoard.errors[7771810].message }}
  • Profile picture of the author jay walters
    This is very helpful, thank you for sharing this code.
    {{ DiscussionBoard.errors[7771886].message }}
  • Profile picture of the author Michael71
    Redirecting non-www to www

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    Redirecting www to non-www

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^yourdomain.com$ [NC]
    RewriteRule ^(.*)$ http://yourdomain.com/$1 [R=301,L]
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7771998].message }}
  • Profile picture of the author vjboc
    Thanks Michael, This is great info to have.
    {{ DiscussionBoard.errors[7772852].message }}
    • Profile picture of the author tedobee
      Trying to find information on this .htaccess and getting lost how the file should be.

      I want to:
      Protect wp-admin
      Hide Plugins used
      Prevent Hotlinking
      Hide Directories

      My current one looks like this:
      Code:
      # BEGIN WordPress
      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteRule ^index.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
      </IfModule>
      
      # END WordPress
      any help would be fantastic.
      {{ DiscussionBoard.errors[7779467].message }}
      • Profile picture of the author Istvan Horvath
        That's the default WP .htaccess file.

        Hopefully, Michael will post a more detailed answer for you; I want to address only the plugins and directories issue:
        - in recent WP versions there is an empty index file in directories that should NOT be seen... just check the plugins or themes or wp-content folder in your newly downloaded WP! Which means your plugins cannot be identified and your directories are not displayed. At least not the WP directories. BTW, when it is simply about not revealing the "directory index" (showing files and folders when there is no index file), just place an empty index file (index.php or index.html doesn't matter) in that directory.



        Originally Posted by tedobee View Post

        Trying to find information on this .htaccess and getting lost how the file should be.

        I want to:
        Protect wp-admin
        Hide Plugins used
        Prevent Hotlinking
        Hide Directories

        My current one looks like this:
        Code:
        # BEGIN WordPress
        <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteRule ^index.php$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]
        </IfModule>
        
        # END WordPress
        any help would be fantastic.
        Signature

        {{ DiscussionBoard.errors[7788640].message }}
        • Profile picture of the author tedobee
          Originally Posted by Istvan Horvath View Post

          That's the default WP .htaccess file.

          Hopefully, Michael will post a more detailed answer for you; I want to address only the plugins and directories issue:
          - in recent WP versions there is an empty index file in directories that should NOT be seen... just check the plugins or themes or wp-content folder in your newly downloaded WP! Which means your plugins cannot be identified and your directories are not displayed. At least not the WP directories. BTW, when it is simply about not revealing the "directory index" (showing files and folders when there is no index file), just place an empty index file (index.php or index.html doesn't matter) in that directory.
          Thank you Istvan for helping me out with the part of the plugins. That is some information I needed.

          Hopefully I can get the rest sorted out.
          {{ DiscussionBoard.errors[7793514].message }}
  • Profile picture of the author teetot
    The htaccess in HTML5 Boilerplate: The web's most popular front-end template is much more extensive than this
    {{ DiscussionBoard.errors[7780518].message }}
  • Profile picture of the author computarded
    Looks like something useful for protecting my wp blog. Is that what I'm looking at here? Obviously new to this. Do I copy and paste that in the file? Thanks
    {{ DiscussionBoard.errors[7787430].message }}
    • Profile picture of the author Kingfish85
      Originally Posted by computarded View Post

      Looks like something useful for protecting my wp blog. Is that what I'm looking at here? Obviously new to this. Do I copy and paste that in the file? Thanks
      ^THIS is the problem with all this htaccess stuff. Most of what people "copy/paste" into their htaccess either causes other headaches or can be done other ways. For example: correct file permissions. Adding all of this junk to the htaccess file to be processed requires more overhead.

      People, please learn & understand what is what when adding things to your htaccess file & what the correct way to do something is.

      Another poor example: "#Protect Directories Without Index" ?!?! Put an index file in each directory! Why continue to add lines that need to be processed?

      Protect wp-admin? Password protect it at the directory level!

      Sooo many rewrites.

      Next people will be complaining their sites are either slow or getting suspended!
      Signature

      |~| VeeroTech Hosting - sales @ veerotech.net
      |~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
      |~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
      |~| Visit us @veerotech Facebook - Twitter - LinkedIn

      {{ DiscussionBoard.errors[7789832].message }}
  • Profile picture of the author David V
    Just to add to what Istvan stated regarding adding an index file to directories......
    You can drop this into your .htaccess to protect directories without index's
    Code:
    #Protect Directories Without Index
    Options -Indexes
    Personally, I add that and physically check all directories, only takes a minute.
    Note: I would highly recommend taking a look at Jeff Star's 5G Blacklist as it directly relates to .htaccess
    {{ DiscussionBoard.errors[7789764].message }}
  • Profile picture of the author David V
    @Kingfish85 I'll concede and have to agree with you.....before WP straightened out their act it was the shortcut way to not worry about someone trolling a directory...
    So.....I take it back
    {{ DiscussionBoard.errors[7789856].message }}
    • Profile picture of the author Kingfish85
      Originally Posted by David V View Post

      @Kingfish85 I'll concede and have to agree with you.....before WP straightened out their act it was the shortcut way to not worry about someone trolling a directory...
      So.....I take it back
      This is true. If there's only a few lines in the htaccess, no big deal. But, being a web host & dealing with htaccess problems quite frequently, I see a lot of copy/paste stuff that shouldn't be there.

      EDIT: along with some that are literally a few hundreds of lines that cause all sorts of problems.
      Signature

      |~| VeeroTech Hosting - sales @ veerotech.net
      |~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
      |~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
      |~| Visit us @veerotech Facebook - Twitter - LinkedIn

      {{ DiscussionBoard.errors[7789908].message }}
  • Profile picture of the author Michael71
    First of all I did NOT say "copy everything into your .htaccess and you are safe"... I just put all into one CODE block and commented everything.

    Which code you will use or not is up to you.

    And I did not say "use it for Wordpress"...
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7790969].message }}
    • Profile picture of the author Kingfish85
      Originally Posted by Michael71 View Post

      First of all I did NOT say "copy everything into your .htaccess and you are safe"... I just put all into one CODE block and commented everything.

      Which code you will use or not is up to you.

      And I did not say "use it for Wordpress"...
      Never said you said to copy it. The problem is, by posting all of that, people automatically think it's ok to copy past it. I also pointed out the multiple posts above that validate what I said.
      Signature

      |~| VeeroTech Hosting - sales @ veerotech.net
      |~| High Performance CloudLinux & LiteSpeed Powered Web Hosting
      |~| cPanel & WHM - Softaculous - Website Builder - R1Soft - SpamExperts
      |~| Visit us @veerotech Facebook - Twitter - LinkedIn

      {{ DiscussionBoard.errors[7790986].message }}
  • Profile picture of the author oknoorap
    thanks I bookmarked this...
    {{ DiscussionBoard.errors[7804306].message }}
    • Profile picture of the author e-spired
      Hi,

      You might like to remove the txt from the following line of your .htaccess file as this may block search engine crawlers from reading the robots.txt file.

      RewriteRule .*.(jpe?g|gif|bmp|png|zip|rar|tar|gz|txt)$ http://www.redirecttodomain.com/ [L]
      {{ DiscussionBoard.errors[7926931].message }}
  • Profile picture of the author bigwilsy
    WOW thanks this is really cool. Thanks!
    Signature

    MySwapStore. A website designed to reinvent the way 'one to one' swapping happens on the internet. It's safe and a fun way of keeping in touch! Get your free SwapStore today at myswapstore.com!

    {{ DiscussionBoard.errors[7935810].message }}

Trending Topics