Wine Label Design - NOIR femmé
In part 2 I explained how to create the .htaccess file which will be saved as a htaccess.txt file to upload to the server.
1. Now we need to re-create the 301 with code that talks to wordpress and 2. make our http://mydomain.com a www. like the old static site for the site can revert to the old static pages - and search engines will be confused if you want to keep page rank.
If your CMS is Wordpress, in this case we’re talking about this CMS, that Wordpress has already inserted a .htaccess file on your server? Huh! That’s what I said.
In this case we had to somehow get our 301 redirect to work with this code within the .htaccess file.
We, A. Add code to it, B. delete what is there, or C. Replace?
The answer is A. Add to the code.
But wait, will the 301 Redirect and Permanent actually work now? No, we need to change that code to speak with the CMS. Yes the code would work for UNIX system but that code is really for a Static site redirect, we need to make it more wordpress friendly.
The code that wordpress implemented in the .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Without this little bit of code, wordpress crashes and your site will have a 404 Error meaning no more website. But don’t worry as long as you keep the code there in the .htaccess file you will be fine.
1. How to do the 301 redirect for wordpress?
example:
RewriteRule ^/about.html$ http://www.mydomain.com/about-us [L,R=301]
RewriteRule ^/work.html$ http://www.mydomain.com/our-work [L,R=301]
NOTE* if the / after the ^ does not work than take it out.
So now you can add this to the code that already exists.
You can put it anywhere but we put it in like this
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^/about.html$ http://www.mydomain.com/about-us [L,R=301]
RewriteRule ^/work.html$ http://www.mydomain.com/our-work [L,R=301]</IfModule>
# END WordPress
Add all the pages you want to redirect from your old (static) URLs to your new URLs.
2. Now still to fix the www. issue.
To make the site’s URL http://www., go into WordPress; Settings; General, and add the www to the ‘WordPress URL’, and ‘Site Address’ section!
TIP: to prevent your old index.html page from showing as your front page (reverting back) add an _ underscore to the beginning like this _index.html.
And Presto!
The site still has it’s page rank, you told the robots that your static pages URL’s have change to a new URL with a 301 redirect, and the CMS is no longer http://mydomain.com but http://www.mydomain.com or www.mydomain.com.
:)
Part 2
Creating the .htaccess file
Before creating this file make sure you know what type of server you’re running on - in this case we’re using UNIX Web Server.
1. Include the following code:
redirectMatch 301 ^(.*)$ http://www.domain.com
redirectMatch permanent ^(.*)$ http://www.domain.com
Another way to implement by using this:
redirect 301 /index.html http://www.domain.com/index.html
redirect permanent /index.html http://www.domain.com/index.html
redirectpermanent /index.html http://www.domain.com/index.html
2. If you want to change http:// to http://www. use this:
NOTE* make sure you have mod_rewrite enabled on your server than you can input this into your .htaccess file:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
Implementing on WINDOWS web server:
redirect 301 /old/old.htm http://www.you.com/new.htm
NOTE* do not put http:// at the beginning of the old file URL.
Conclusion: The best way to keep page rank on search engines is to use a 301 redirect for conversion from old static webpages to new dynamic webpages!
Google states that it can take 6-8 weeks for the full page rank transition to recover and that you will see some fluctuation during the period.
When building a CMS for a client (making a smooth transition from a Static website to a Dynamic one) you need to do a few steps to make this transition search engine friendly especially for a high quality website.
Because you are going from a Static website to a Dynamic one the URL will change because the site will now be running as part of a database.
For example if your site URLs are set up like this -
www.site.ca/site/product-phone.html the url will now be more likely this - www.site.ca/product-phone/
There won’t be any .html pages anymore, so in reality the pages Google has indexed will change - and than in turn you will lose your Google rankings.
How can we get around this?
You need to do a 301 redirect - this is the best method for preserving your site rankings with search engines. A 301 redirect is really a .htaccess file that gets crawled by spiders/robots when they visit your site. Because you now have new pages (URLs) than you need to tell site crawlers that these pages have changed. The 301 redirect - .htaccess file gets crawled and tells crawlers these pages have ‘moved permanently’.
Part 2 - How to create the .htaccess file
will explain steps on how we do this!
Welcome!
We’re proud to announce the new Trü Dzign website!
Have a look www.trudzign.ca
Send us inquiries or request a quote at:
info@trudzign.ca
Thanks for all the support!
Crystal Bubinas
Trü Dzign: The Power of Creation!
Ok you people who still are using Internet Explorer, time to get out of the old and into the new! The Internet Explorer browser is a dinosaur and I heard through the grapevine there will no longer be updates for it. Internet Explorer doesn’t view most web-pages properly and there are always major viewing issues.
The most used and now standard browser out there right now is ‘Firefox’ (Mozilla).
The World’s best browser Firefox!
Get Mozilla ‘Firefox’ now:




