Skip to content

Url Rewriting with COPS

seblucas edited this page Jan 25, 2013 · 11 revisions
  • Nginx :
      location /download/ {
        rewrite ^/download/(\d+)/.*\.(.*)$ /fetch.php?data=$1&type=$2 last;
        break;
      }
  • Apache : Should work out of the box with the supplied .htaccess

  • Cherokee (Thanks to Christophe) :

    • Add a Behavior of type Regular Expression : /cops/download/(.*)/.*\.(.*)$
    • Choose the handler Redirection
    • Add the substitution regexp : /cops/download/(.*)/.*\.(.*)$" --> "/cops/fetch.php?data=$1&type=$2
Clone this wiki locally