View Single Post
  #2 (permalink)  
Old 08-20-2008, 01:42 PM
ronniethedodger's Avatar
ronniethedodger ronniethedodger is offline
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Central US
Posts: 1,265
ronniethedodger RepRank 1
Default Re: Rewrite for SEO purposes - php to html

I don't think you will need any robots.txt file adjustments.

One thing you will need in your .htaccess file is a directive to process .html pages as PHP.

Code:
AddType application/x-httpd-php .html .htm
or

Code:
AddHandler application/x-php .html .htm
I always have problems with one not working, but the other will. Try them both.

As for the pages themselves, I have seen one method that works without any need for nasty mod rewriting. You will still need a Rewrite rule in your .htaccess -- I am not sure how the rewrite rule is constructed, but it is a simple RegExp. Sorry.

All you need is one php script, without the .php extension. You will add that page to your .htaccess AddType php handler too. Lets call the file 'products'

All the products script does is process the rest of the url following afterward. The script file is in your root domain (not a sub-directory, but looks like a directory in the Url)

Code:
http://domain.com/products/ink-jet-ribbons-and-printers.html

Last edited by ronniethedodger; 08-20-2008 at 02:20 PM.
Reply With Quote