irislines web design
irislines web design

Posts Tagged ‘htaccess’

htaccess 301 redirects

It happens sometimes that you just need one or two old addresses , or shortened addresses to be mapped to a current url.

Adding a few lines of code to the .htaccess file just might be the fix you need.  These might be actual file names for a static website, or a Joomla  generated url or WordPress permalink.

Here’s the syntax:

Redirect 301 /old-path/old-url-name.html

Redirects using .htaccess

Set up additional domains as “parked” domains.  Then,  open the .htaccess file for the primary domain and add these lines immediately after the   RewriteEngine On  line.

RewriteCond %{HTTP_HOST} ^(www.)? [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Change the BADDOMAIN AND GOODDOMAIN as appropriate.


IrisLines LLC
101 Washington Street
Brattleboro, VT 05301

802 257 7391