Regular Expressions Question

Brandon S Allbery KF8NH allbery.b at gmail.com
Wed Mar 23 13:36:43 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/23/11 13:50 , Jasper Frumau wrote:
> Does that mean the string
> /wp-content/plugins/shopp/core/image.php?siid=$1&$2 is added to everything +
> *shop/images/(\d+)/?\??(.*)  ? What would be the use of that?

> RewriteRule ^.*shop/images/(\d+)/?\??(.*)$
> /wp-content/plugins/shopp/core/image.php?siid=$1&$2 [QSA,L]

No, it means that any URL which contains "shop/images/(\d+)/?\??" gets
everything through that pattern rewritten to
"/wp-content/plugins/shopp/core/image.php?siid=$1&".  ($2 just copies
through the rest of the request string.)  So it's redirecting image requests
within the shop to its image handler.

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]    allbery.b at gmail.com
system administrator  [openafs,heimdal,too many hats]                kf8nh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2KWdsACgkQIn7hlCsL25XuewCfV2SYbyJDNrqIS3kI2C2GKa1B
adEAoKrdsruPKE5C6UdDMXyPO3Dnk4EB
=KVq1
-----END PGP SIGNATURE-----


More information about the macports-users mailing list