Search Engine Friendly URL to convert .php and replace with .html file extension using .htaccess
Posted by admin
Converting or hiding .php and replace with .html file extension using .htaccess is the process of Rewriting your URL. Before we could start doing that, first enable your mod_rewrite in your apache.
What is .htaccess file?
.htaccess files can give you extra control over your server, allowing you to password protect directories, enable server side includes, generate custom error messages, and block users by IP address among other things. An htaccess file is a simple ascii text file which you create or edit in a text editor. The dot (.) before the word htaccess indicates that .htaccess is a file extension. Some text editors will add on an additional .txt file mextension when you save your document.
How to enable how to mod_rewrite module in apache installed under windows environment.
1) Find the “httpd.conf” file under the “conf” folder inside the Apache’s installation folder.
2) Find the following line “#LoadModule rewrite_module modules/mod_rewrite.so” in the “httpd.conf” file.You can do this easily by searching the keyword “mod_rewrite” from find menu.
3) Remove the “#” at the starting of the line, “#” represents that line is commented.
4) Now restart the apache server.
5) You can see now “mod_rewrite” in the Loaded Module section while doing “phpinfo()”.
To begin wit, create a file name ".htaccess" on your root directory of your website. Insert the the codes below on the .htaccess file if you have already an .htaccess file copy and paste the codes on your .htaccess, insert it below the existing .htaccess codes.
To make things easier download the sample script below...
# put this .htaccess file to your site root directory #
Options +FollowSymLinks
# start the Rewrite Engine or Rewrite Mode #
RewriteEngine On
# check the url if it has an extension of .html #
RewriteCond %{REQUEST_URI} \\.html$
RewriteRule ^(.*) index.php
Back to List | Comments (7) | October 03, 2009 at 03:28 pm
Leave a Reply
Latest News (2)
iWebProvider.com No 1 at Yahoo search engine for the keyword -filipino web developer.
Posted on October 02, 2009
On Sept 6, 2009 iWebProvider.com is No. 1 at Yahoo and Google for keyword "filipino web developer".
continue reading
Launching of the updated iWebProvider.com
Posted on October 02, 2009
Now as of July 7, 2009 the launching of iWebProvider.com with its improve feature and the used of its very own CMS. It now has features like Blogs, comments on News articles and the upcoming user registration.
continue reading
Wise Words
"It's not about how many you have learned but how much you have utilized and mastered what you have learned."
- by: Mark Lester

7 Responses
Jeff Paul Shortcuts says:
Oct 02, 2009 at 08:26 am
I found your post really interesting. I found Internet marketing a really a great way of promoting a website. I found good results when I started internet marketing my website.
Internet Marketing Success Sto says:
Oct 09, 2009 at 01:26 am
Great post! My friend runs a small business we do internet marketing for companies and so a lot of our e-newsletter, blog and seminar content revolve around for promotion. Thanks!!!
Jeff Paul Forum says:
Oct 11, 2009 at 01:04 am
Great work! What is discuss here is one side of the coin, what about social media, isnt it a challenge to google
Internet Business Review says:
Oct 11, 2009 at 02:09 am
Really Nice Post. More and more businesses are indulge with online presence, it is costly if you find a wrong company to do your job
Michelle Boudreau says:
Oct 13, 2009 at 04:44 am
I like your post. No matter what amount of debt a person has, willingness to retire is the first step
Melton Geconcillo says:
Dec 20, 2009 at 12:19 pm
Bai, some of the comments are spams... no follow ni imu links???
Mayur Shah says:
Jan 05, 2010 at 04:58 pm
Hi,
Its interesting for the SEO friendly URL creatin we had followed it and created using mod re-write with htaccess file you can see real PHP page converted into .html hahaha.. see here http://www.addonsolutions.com/design-a-web-2.0-website.html
Thanks
Mayur