The part of ~one/cart/cart.cgi always stays the same...
Thanks!
RewriteEngine On
RewriteRule ^([0-9]+)/?$ /~one/cart/cart.cgi/$1.html [L]
RewriteEngine On
RewriteRule ^([0-9]+)/?$ /~one/cart/cart.cgi/$1.html [PT,L]
I ment my posting...Of course you're correct! I misspelled a directory
RewriteRule ^([^.]+) /~one/cart/cart.cgi/scan/sp=product_listing/fi=products/st=db/co=yes/sf=prod_group/se=$1/tf=category/ml=10/va=prod_group=SearchTerm/va=cats=.html [L]
I wouldn't recommend to use mod_rewrite here, PHP might be the better place, because this might cause problems.I have a 2(or more) word search term (for simplicity lets call it Search Term) that needs to look like http//example.com/Search-Term.html and rewritten into the above string with se=Search Term (with a space), how would i go about that? I guess i have to take the - and sub it for a space and then strip out .html, but not sure how i can do that...
and the very last one...just like the example above, except i want to have 2 terms that should be accessed like:
RewriteRule ^([^~-]+)-([^-]+)\.html$ /$1\ $2.html [L]
RewriteRule ^([^~/]+)/([^./]+) /~one/cart/cart.cgi/scan/sp=product_listing/fi=products/st=db/co=yes/sf=prod_group/se=$1/se=$2/tf=category/ml=10/va=prod_group=SearchTerm/va=cats=.html [L]
RewriteRule ^([^.~]+) /~one/cart/cart.cgi/scan/sp=product_listing/fi=products/st=db/co=yes/sf=prod_group/se=$1/tf=category/ml=10/va=prod_group=SearchTerm/va=cats=.html [L]
this will nor work if the Search Term contains a ~ . in general and a / for rule #2What if the Search Term 1 has a '/' in it, such as Search/Term 1?
Return to Friendly URLs with Mod_Rewrite
Users browsing this forum: No registered users and 26 guests