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)

5+ Year Member

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)

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

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.