Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

URLs being rewritten using mod_rewrite .html to PHP

Rewrite .html URLs to PHP files.

10:47 am on Oct 10, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 25, 2008
votes: 0

Hi All,

PHP is Server Side! HTML is Client Side! I am not redirecting any HTML to PHP. The websites internal pages are coded in PHP, but the webpages are served up as HTML. No person, nor search engine, knows that we are even using PHP.

It is completely hidden due to the URLs being rewritten using modrewrites in the .htaccess file.. It allows the pages to be created dynamically using databases.

Is search engine don't know the differnce?
Is this SEO Friendly Technique?
Is this effect the website for indexing and traffic?

Any one please help me to knbow above queries!

2:12 pm on Oct 10, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
votes: 0

If the mod_rewrite code is correct, then no-one --including search engines-- knows that your .html URLs return content generated by PHP files.

It is SEO friendly only in that it avoids having to change all of your URLs from .html to .php. Otherwise, search engines don't really care, because either way, they're going to get an HTML page -- either because the URL resolves to a 'real' static .html file, or because your PHP script(s) produce HTML pages as their output.

This should have no effect on indexing and traffic, because no-one except you cares how HTML pages are produced on your server. In fact, the current trend is to move to 'extensionless URLs' -- for example, to use "example.com/page" instead of "example.com/page.html" or "example.com/page.php". Again, no-one but you really cares how the content for that URL was generated - whether by an HTML editor or by a server-side script.