01 Oct

htaccess Icon Logo

301 Redirect urls using htaccess

Have you ever created a new website for a client and needed to forward old url pages to their new urls, in order to update google and the other search engines.

 Example 1.


Based on the above information, edit the .htaccess file add the following:

redirect 301 /your_old_page.html

Things to note are the old page doesn't need to be the full url address, but the new page does.

 Example 2.

Here is another example which forwards the whole contents of a folder to a new url.


RewriteRule ^forum/(.*) [R=301,L]
Posted in: < Website Server >
me@grafxflow avatar


I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. Thanks for stopping by!

Visitors also viewed these posts

Add comment

Add comment