Skip to content

Instantly share code, notes, and snippets.

@aarongustafson
Created September 29, 2011 12:40
Show Gist options
  • Select an option

  • Save aarongustafson/1250652 to your computer and use it in GitHub Desktop.

Select an option

Save aarongustafson/1250652 to your computer and use it in GitHub Desktop.

Revisions

  1. aarongustafson created this gist Sep 29, 2011.
    10 changes: 10 additions & 0 deletions .htaccess
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    # setup
    RewriteEngine on
    RewriteBase /

    # product redirection based on iPhone and product request
    # note: the user agent check is contrived, you should have
    # a much more robust checker
    RewriteCond %{HTTP_USER_AGENT} iPhone
    RewriteCond %{QUERY_STRING} Prodid=(\d+)
    RewriteRule ^Browse\/Product\.aspx http://m.costco.com/costco/product/productDirectDetail.do?itemId=%1 [R=301,L]