Permanent Redirect your URL from non-www to www by using following code
RewriteEngine On
RewriteCond %{HTTP_HOST} ^websitedesigning-company.com [NC]
RewriteRule ^(.*)$ http://websitedesigning-company.com/$1 [L,R=301]
or
Permanent Redirect any single file URL to give some other one
RewriteCond %{HTTP_HOST} ^websitedesigning-company.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.websitedesigning-company.com$
RewriteRule ^mtp\/career_profile\.php$ “http\:\/\/websitedesigning\-company\.com\/mtp\/career\-advice\-online” [R=301,L]
OR
RewriteRule oldfile name$ new file name with full path
RewriteRule ^career-advice/interview-coaching$ http://www.mytalentplace.co.uk/interview-skills/interview-coaching [R=301,L]
for every . and [...]
Posts Tagged ‘url rewriting’
301 non-www to www or Permanent Redirect any single file URL to give some other one
Posted by Bagesh Singh on May 21st, 2010
5 useful url rewriting examples using .htaccess
Posted by Bagesh Singh on February 22nd, 2010
If you are looking for the examples of URL rewriting then this post might be useful for you. In this post, I’ve given five useful examples of URL rewriting using .htacess. If you don’t know something about url rewriting then please check my older post about url rewriting using .htaccess.
Now let’s look at the examples
1)Rewriting [...]
How to check and enable mod_rewrite module in apache
Posted by Bagesh Singh on February 22nd, 2010
Well, I’ve got around 15 emails asking from readers, how to check the mod_rewrite module in apache and enable mod_rewrite module in apache after reading two most of the popular post of this blog 5 useful url rewriting examples and hide .php extension with url rewriting.
How to check weather mod_rewrite module is enabled or not?
Well [...]
Posted in
Tags: