Hi All
Nice to see there is a board just for mod_rewrite as its a pain in the bum
I have managed to figure out some stuff by myself and its working quite well:
RewriteRule ^about.html$ index.php?a
RewriteRule ^home.html$ index.php?h
RewriteRule ^shipping_returns.html$ index.php?sr
RewriteRule ^payment_types.html$ index.php?pt
RewriteRule ^customer_feedback.html$ index.php?cf
RewriteRule ^coming_soon.html$ index.php?cs
RewriteRule ^privacy_policy.html$ index.php?pp
RewriteRule ^contact_us.html$ index.php?cu
RewriteRule ^catagory/([0-9]+)/([^/]+)\.html$ index.php?c=$1
RewriteRule ^product/([0-9]+)/([0-9]+)/([^/]+)\.html$ index.php?i=$1&ic=$2
this does as it says redirects html files to various index with _GET's which is working well.
the bottom 2 are basicly to allow me to display a product name in the .html file as the filename.html is ignored the only varaibels are the product/{ITEM_NUMBER}/{ITEM_CATAGORY}/blahblah.html
but with what im explaining i want to do mysite.com/the_product.html and that take you to the right page. i understand this can be done but each product is dynamic and i dont want to type out the rules each time. also see below for more rambalings.
But i am thinking if i want admins of this site im not going to want them to load up the .htaccess file and add blocks of code in, as they wont be able to understand it, shucks i don't even understand it
so i was browsing one of my customers sites which i installed (CS-Cart) [im writing my own] and he has SEO what ever that is and mod_rewrite. his .htaccess file looks like this.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]
but he has hundreds of products on his site and they all have there own links and stuff but with nothing in the .htaccess file, how is this possible?
i have found a list of link names in a MySQL table. but how is this done?
Is it easy to do, i tried to find every SEO / Mod_rewrite file in the cs-cart system and tried to look at the code but couldn't understand any of it. as it was properly organized and stuff.
i tend to write stuff as i see fit. im not the best for keeping up programming practices.
If anyone could help i would be most grateful, and will give you a vCookie
Thanks
Kev