Featured Posts

Social marketing measurement is like relationships... It seems lately everyone is talking about measuring social media engagement, ROI on social marketing and quantifying the value of audiences (fans, followers, subscribers,...

Readmore

Manors, courtesy and being a gentleman Let me start by saying thank you to my Mom,  Dad and my Grandparents!  You raised me and taught me many things and although I am grateful for many of the life lessons...

Readmore

10 Social Marketing Guidelines for Self-Promotion on... The following Social Marketing Guidelines should be considered when promoting yourself or your company on Facebook but also any social marketing platform. Be Authentic...

Readmore

Dear FDA, Dr House calling...people lie! For many years I have been fortunate to work in industries which I greatly enjoy....these include chocolate, alcohol, gambling and tobacco.  In full disclosure, I agree,...

Readmore

Is your platform online or offline? I think best at 38,000 ft. It could be the solace of having to stop from the busy daily rat race and being forced to sit for extended periods of time or the miniature...

Readmore

Jeremy Schell Rss

Recursive .htaccess redirects

Posted on : 08/22/2011 | By : Jeremy Schell | In : Coding, Internet

0

Recently I came across a request on Twitter for an effective means to update the .htaccess file to redirect all pages to a new domain without having to update for all subdirectories.  Here are a couple choices which can be easily placed in the root .htaccess file.

OPTION 1 (this does not need the RewriteEngine module)

Option 2 (this requires the use of the RewriteEngine module)

  • Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^oldwebsiteaddress.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.oldwebsiteaddress.com$
    RewriteRule (.*)$ http://www.YourNewDomainAddressHere.com/$1 [R=301,L]