Posts tagged mod_rewrite

Basic Introduction of Apache rewrite rules

Today, I had a basic talk about apache’s rewrite rules. Slides are below:

Apache Rewrite Rules
View SlideShare presentation or Upload your own. (tags: apache rewrite)

Redirect all trafic comming to domain.com to www.domain.com using apache mod_rewrite

You may want to redirect all visitors to coming to your domain “domain.com” to “www.domain.com”. Most popular way to do this is using apache’s mod_rewrite module. You just need to add few lines in your apache’s configuration file:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com$1 [R=permanent,L]