Blog Archives

Redirect domainname.com to www.domainname.com

To redirect (rewrite) a subdomainless site to the www prefixed one with apache, use mod_rewrite. This must be enabled in Apache’s conf file, and allowed to override the defaults with AllowOverride in the relevant directory section. Line 5 checks to

Posted in .htaccess, apache, linux Tagged with: , , , , , ,

RewriteEngine to change URLs with Apache and .htaccess – 4 easy and common examples

The RewriteEngine modification of the URL allows for many tricks such as readable URLs and maintaining links after site redevelopment. There are many good reasons to clean up URLs into something readable, including having the customer/client remember the link, being

Posted in .htaccess, apache Tagged with: , , , ,