gravereaper Posted December 3, 2006 Share Posted December 3, 2006 I'am developing a PHP powered site right now, but is it possible to use PHP codes in .html files so they can be crawled by search engine crawlers? And if its not possible, then how are those php site indexed by search engines? Link to comment Share on other sites More sharing options...
MrAdam Posted December 3, 2006 Share Posted December 3, 2006 i've read somewhere that URLs like:yoursite.com/file.php?var=1&var=2can be converted into URLs like:yoursite.com/file.php/1/2or something similar, which i guess makes the search engines able to read them better or something. and i think in the PHP config you can change what files are parsed. Link to comment Share on other sites More sharing options...
boen_robot Posted December 3, 2006 Share Posted December 3, 2006 You can configure your server (Apache, IIS, etc.) to parse PHP files under any sort of extension, be it PHP, HTML, XHTML, XML, or anything else of your bidding.Again, with server configuration, you may also rewrite folders to query strings to folders. That is turn file.php?var1=1&var2=2 into file.php/1/2 or better yet: file/1/2 Don't do it if it's only for SEO though. Search engines list all files that have the MIME type text/html, as well as few other MIME types. They don't care of the exntension of the file. Just it's MIME type. Link to comment Share on other sites More sharing options...
jlhaslip Posted December 3, 2006 Share Posted December 3, 2006 Place this line in your .htaccess file to have html files parsed through the php parser so that all your file extensions can remain html, but the files can contain php code snippets. It works the server a bit harder and slows done the serving of files, but unless you are extremely busy, the clients will never notice. AddType application/x-httpd-php .html .htm Link to comment Share on other sites More sharing options...
justsomeguy Posted December 4, 2006 Share Posted December 4, 2006 Search engines index .php or .asp or .cfm or whatever just fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now