Posts Tagged ‘Apache’

.htaccess rewrite to redirect non-www to www

August 25th, 2011

htaccess redirect www to non-www


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

htaccess redirect non-www to www


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

htaccess redirect from one site to another


RewriteEngine on
RewriteCond %{HTTP_HOST} ^OLD_DOMAIN\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.OLD_DOMAIN\.com$
RewriteRule ^(.*)$ "http\:\/\/NEW_DOMAIN\.com\/$1" [R=301,L]

default icons for apache?

March 11th, 2010

When I make a dir “icons” under the root of a virtual server, for example, http://localhost:8088. It just covers what I put under this folder and goes to a default icon folder seems to be a part of apache. Why?