Skip to main content

Posts

Showing posts from August 8, 2008

Ultimate htaccess Examples

Heres the actual code that I use when I'm developing sites for clients This lets google crawl the page, lets me access the whole site (24.205.23.222) without a password, and lets my client access the page WITH a password. It also allows for XHTML and CSS validation! (w3.org) # ELITE HTACCESS FOR WEBDEVELOPERS ############################################## AuthName "SiteName Administration" AuthUserFile /home/sitename.com/.htpasswd AuthType basic Require valid-user Order deny,allow Deny from all Allow from 24\.205\.23\.222 Allow from w3.org htmlhelp.com Allow from googlebot.com Satisfy Any Each code snippet has been copied from htaccesselite. Additional and detailed info on each htaccess code snippet can be found at askapache.com NOTE: Most of these snippets can be used with a Files or Filesmatch directive to only apply to certain files. NOTE: Any htaccess rewrite examples should always begin with: Options +FollowSymLinks RewriteEngine On RewriteBase / ...