Tags » Htaccess

www redirection with htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1



Defending this script has become my biggest nightmare in the last few months. Black listing mostly works for denial of service from poorly written bots. I blacklist amazon, web hosts, many foreign countries, without hesitation, not just one IP but their whole allocation. 247 more words

Leverage browser caching

<IfModule mod_expires.c>
ExpiresActive On
<FilesMatch "(?i)^.*\.(jpg|jpeg|png)$">
ExpiresDefault "access plus 1 year"
<FilesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2592000, public, must-revalidate"


reloading files ... not fun

My workstation has a weird short circuit somewhere that has to be tracked down at the help desk. While I wait, I’ve tried to install my work on the department laptop. 686 more words

Software Upgrade

Password protecting a subdomain / directory in Apache

If you need to password-protect a subdomain or directory with Apache, the process is relatively simple and involves only two files in the appropriate directory. This can be useful if, for example, you want to run a beta version of a site for select people only, don’t want it indexed by search engines, etc. 201 more words


How to perfect url in address bar php, .htaccess, or javascript

This my .htaccess :

Options +FollowSymLinks
RewriteEngine on
ErrorDocument 404 /?page=404

# 1-level
RewriteRule ^contact/{0,1}$  index.php?p=contact 
RewriteRule ^displaydata/{0,1}$  index.php?p=displaydata 
RewriteRule ^log-in/{0,1}$  index.php?p=log-in 
RewriteRule ^log-out/{0,1}$     ?p=log-out 

# newweb.com/contact# = newweb.com/contact/#
#RewriteRule ^contact/(.*)?$ $1
#RewriteRule ^displaydata/(.*)?$ $1
#RewriteRule ^log-in/(.*)?$ $1
#RewriteRule ^log-out/(.*)?$ $1

# set URI to /index.php/200 if query string is id=200
RewriteCond %{QUERY_STRING} (?:^|&)id=(200|1)(?:&|$) 
RewriteRule ^(index\.php)/?$ $1/%1 

# set SECURED var to 1 if URI is /index.php/200
SetEnvIfNoCase Request_URI "^/index\.php/(200|1)" SECURED

# enforce auth if SECURED=1
AuthType Basic
AuthName "Login Required"
AuthUserFile /full/path/to/passwords
Require valid-user
Order allow,deny
Allow from all
Deny from env=SECURED
Satisfy any
# all other cases
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .+ -  [L]
… 110 more words

No input file specified :Codeigniter

i was uploading my codeigniter website from testing server to production server

i.e, from amazon linode to shared hosting space ” bigrock.com”  after configuring all the files when i typed the controller name it gave me “NO input file specified” was shown on screen . 115 more words