yellow1912:
So you are saying it's bad because of this .html?
I thought it's fully customizable thru admin?
:D
yes, never use .html on any SEO URLs. It's outdated, and not up to current W3C standards. Using .html is so 1997 (lol?).
Anyway, back on track...
OK guys, I'm VERY impressed with the framework this mod is written on:
http://www.zen-cart.com/forum/showthread.php?t=14132&page=65
http://breakmyzencart.com/sefu
Let me explain, instead of sloppy htaccess rewrites, he's feeding the query to zen cart, and outputting whatever page he wants. The key to feeding your virtual URLs (in fact, all URL requets) to index.php is this simple htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Now, this is the exact HTACESS I've used on a wordpress project. SEFU gets pretty close to this, although he's got several things in his HTACESS that I don't like. I want to change his mod to use this htaccess above... clean, simple.
Anyway, this piece of HTACESS feeds all queries into index.php (if needed you can add a directory). Of course this can be changed to feed the queries to any page you like.
the REQUEST_FILENAME F/D pieces are to make sure you don't try to rewrite any pages that physically exist on the server.
With this htaccess, you get the URI requested by using the PATH_INFO parameter:
http://www.tutorio.com/tutorial/php-alternative-to-mod-rewrite-for-se-friendly-urls
the $HTTP_SERVER_VARS['PATH_INFO'] returns the path of the url from where something.php is being accessed so in this case it will return page/12/category/hosting. This then gets exploded or broken down into the array $data
* $data[0] = page
* $data[1] = 12
* $data[2] = category
* $data[3] = hosting
This way you have access to all the data you need for your php script.
Once you get the requested URL from PATH_INFO & explode/ parse it, there's the whole issue of feeding the right query into zen cart. This is the piece I'm not sure on, I'll have to dig into the SEFU php edits to find this.
After you parse the data, you'll have to be sure to send the right status header for each page...
Any 404 errors, 301 redirects, or 200 'http ok' status headers, would need to be sent--this is a parameter that needs to come at the start of a php header command. Here's a complete dummy exmaple:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.new-url.com" );
?>
Anyway, SEFU's mod is written for 1.2.6d... I would need to convert it to feed the queries correctly to zen cart 1.3.8a (our current version). I'm not sure what other issues it might have.