May

1

If you would like to redirect your files or directories, but are worried about search engines or favorites that are linked to your old files or directories, add the following example to the .htaccess file. Just replace the filename and extension with your own.


Redirect permanent /filename.html http://www.example.com/filename.php
Redirect permanent /shell/install-ubuntu/ http://www.blog.highub.com/linux/install-ubuntu/

The first line above will redirect a link from filename.html to the new filename.php. The second line redirect directory. I believe it is required to have the entire http: protocol for the new file.



Similar Posts

Comments

Name (required)

Email (required)

Website

Speak your mind

2 Comments so far

  1. gracie114 on June 3, 2008 9:30 am

    thanks for providing this useful tutorial! :)

  2. htaccess « Sandeep Verma on December 8, 2008 3:25 am

    [...] Posted December 8, 2008 Filed under: Uncategorized | htaccess Permanently redirect file or directory | Highub - Web Development Blog Similar [...]

Sponsors




Links