Apache HTTP Server Configuration Examples
Options -Indexes
IndexIgnore *
<Files ~ "^\.ht"> deny from all </Files>
OK : http://www.example.com/
NG : http://user.rental-server.com/example.com/
SetEnvIf Host "^www\.example\.com$" hos_ok order deny,allow deny from all allow from env=hos_ok
RewriteEngine On RewriteRule ^(.*)$ http://new.com/
http://old.com/ -> http://new.com/
http://old.com/test1.html -> http://new.com/
http://old.com/test2.html -> http://new.com/
Redirect permanent / http://new.com/
http://old.com/ -> http://new.com/
http://old.com/test1.html -> http://new.com/test1.html
http://old.com/test2.html -> http://new.com/test2.html
RewriteEngine On RewriteRule old.html$ http://new.com/dir/new.html [R=301,L]
http://old.com/old.html -> http://new.com/new.html
Apache HTTP Server Configuration Examples