httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Axel-Stephane SMORGRAV" <Axel-Stephane.SMORG...@europe.adp.com>
Subject RE: [users@httpd] Mod_Rewrite from old dynamic page
Date Wed, 14 Nov 2007 06:51:58 GMT
Try this instead:

  RewriteCond %{QUERY_STRING} ^([^,]*) [NC] 

If it still does not work, bump the RewriteLogLevel to 9 and look for answers in the log file.

-ascs
 
-----Message d'origine-----
De : Ki Song [mailto:ki@knifecenter.com] 
Envoyé : mardi 13 novembre 2007 23:40
À : Apache List
Objet : Re: [users@httpd] Mod_Rewrite from old dynamic page

>> For some reason, the productSKU in the old url was frequently 
>> followed by a ',' (comma). So, for example, 
>> http://store.knifecenter.com/pgi-Product
>> Spec?productSKU, would be a valid url in the old system.
>> 
>> Is there a way to "drop" the trailing ',' in the old url?
> 
> Again, untested, but I would think changing the second line to  
> RewriteCond %{QUERY_STRING} ^(.*),?$ [NC] would do the trick.
> 
> Though in this case it might be safer to just (re)write your web 
> application so that it removes a trailing comma if it occurs: this way 
> you won't get an error, even if a comma slips though the maze. (People 
> might changes their links to a new URL but accidentally leave the 
> comma there.)

It did not work.
RewriteCond %{QUERY_STRING} ^(.*),?$ [NC]

This code left the trailing , in to rewritten url:
OLD: http://store.knifecenter.com/pgi-ProductSpec?productSKU,
NEW: http://www.knifecenter.com/kc_new/store_detail.html?s=productSKU,

Any other solutions?



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message