faqts : Computers : Internet : Web Servers : Apache : Modules

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 26 people (23%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

How do I use .htaccess to redirect web pages to another URL?

Feb 2nd, 2002 18:07
Matt D, http://httpd.apache.org


Use mod_rewrite for extensive URL-based redirection. A comprehensive 
guide with typical examples is available from Apache.org at 
http://httpd.apache.org/docs/misc/rewriteguide.html

.htaccess example redirecting pages matching regular expression:

RewriteEngine  on
RewriteBase    /~quux/
RewriteRule    ^foo\.html$  bar.html  [R]