Forum Moderators: phranque

Message Too Old, No Replies

Mod Rewrite Problem

need help regarding mod_rewrite method

         

biz2trade

9:42 pm on Jul 26, 2006 (gmt 0)

10+ Year Member



Hi all,
we have a website http://www.example.com . All pages are dynamically generated so to turn them into static we use mod_rewrite method below

Options +FollowSymLinks
RewriteEngine on
RewriteRule selling_categories(.*)\.htm$ /cat_sell.php?cid=$1
RewriteRule selling_offers(.*)\.htm$ /selloffers.php?cid=$1
RewriteRule show_companyprofile(.*)\.htm$ /view_profile.php?id=$1
RewriteRule prod_pages(.*)-(.*)\.htm$ /products.php?pg=$1&cid=$2
RewriteRule offers_pages(.*)-(.*)\.htm$ /selloffers.php?pg=$1&cid=$2
RewriteRule prof_pages(.*)-(.*)\.htm$ /profiles.php?pg=$1&cid=$2
RewriteRule show_products(.*)\.htm$ /view_product.php?id=$1
RewriteRule show_selloffers(.*)\.htm$ /view_offer.php?id=$1
RewriteRule products_categories(.*)\.htm$ /cat_products.php?cid=$1
RewriteRule profiles_categories(.*)\.htm$ /cat_profiles.php?cid=$1
RewriteRule buying_categories(.*)\.htm$ /cat_buy.php?cid=$1
RewriteRule buying_offers(.*)\.htm$ /buyoffers.php?cid=$1
RewriteRule companies_products(.*)\.htm$ /products.php?cid=$1
RewriteRule companies_profiles(.*)\.htm$ /profiles.php?cid=$1

but when the links on main page and also on static pages still have query string for example if we open http://www.example.com/selling_categories48.htm then on that page all link have query string?cid i mean then link within static page are not static please help me about this how can i change this also how can i make my entire site in static pages

[edited by: jdMorgan at 11:06 pm (utc) on July 26, 2006]
[edit reason]
[1][edit reason] No URLs, please. See TOS. [/edit]
[/edit][/1]

jdMorgan

11:16 pm on Jul 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This may help: Changing dynamic to static URLs [webmasterworld.com] - A basic introduction to using mod_rewrite on Apache server to implement search-engine-friendly static URLs on dynamically-generated sites.

Jim