Latest 100 public snipts »
robertbanh's
snipts » apache
showing 1-5 of 5 snipts for apache
-
∞ .htaccess rewrite url
# check for form/thanks with or without trailing slash, # and rewrite to /form?m=thanks RewriteRule ^form/thanks(/$|$) /form?m=thanks
-
∞ .htaccess file to lock down files with db or secure in the prefix
<FilesMatch "^(db|secure).*$"> deny from all </FilesMatch> -
∞ Rewrite .cfm files to files with .cfm
RewriteEngine On Options -Indexes # redirect all .cfm files to files without .cfm RedirectMatch 301 ^(.*)\index.cfm$ $1 RedirectMatch 301 ^(.*)\.cfm$ $1
-
∞ Rewrite .htaccess to EE's engine if directory conflicts with existing directory
RewriteEngine On RewriteBase / # if the file/dir does not exist, append index.php # which will call EE and pull up it's structured url RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/interact/$1 [L]
-
∞ My Custom .htaccess file
RewriteEngine On #comment out the options followsymlinks when in prod #Options +ExecCGI +FollowSymLinks RewriteBase /rbanh/blah/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L,QSA] # prevent directory browsing Options -Indexes <FilesMatch "\.(htaccess|svn|xml|inc|.*sql|cache_|.*~)$"> deny from all </FilesMatch>


