Re: Mod_Rewrite from old dynamic page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 13, 2007 7:43 PM, Ki Song <ki@xxxxxxxxxxxxxxx> wrote:
> 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.)

Martijn.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux