The situation are:
There’s a time when we start making website with .html files, it’s hard to update regularly. Then we make it into a dynamic website using .php files. But at the same time our previous website already have their own readers, I mean when the readers bookmarked one of the page.
Lets say the readers bookmarked www.domainname.com/news.html and we change our file name to .php. So it will be www.domainname.com/news.php. Next time the readers open up the bookmarked page, an error page will come out.
How to prevent this from happening? .htaccess file is the solution. All we need to do is redirecting all the .html files your readers type in the address bar to go to the same filename but .php. All you have to do is to create a .htaccess file and paste this code.
RewriteEngine on
RewriteRule ^(.*)\.html $1\.php [L, NC]
Save it and upload it into your server in the same directory with your index.php file.
So you dont have to worry about losing your traffic when you have to change your file name next time.
If you have any suggestions or any tips to add, please leave some comment.
Related posts:
- Increase your traffic like crazy
Same old problems that every developer face is lack of traffics. Let me revealed to you what I found... - 10 ways to make your wordpress theme look like pro.
For me, wordpress is the most easily customizable cms I ever see. There’s always something new about... - Beware Virus In Your Server
HTML/Crypted.Gen Description from avira.com: To avoid detection by antivirus software, authors of H...
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=3086549d-03ac-437c-a6be-ca5bfac9a0ee)




[...] This post was Twitted by jobberies – Real-url.org [...]