samedi 9 mai 2015

Rewrite request to query string

I have these lines in my .htaccess, and it works as I want it to.

RewriteEngine on
RewriteRule ^api$ page.php?id=api

If you go to http://example.com/api, it would rewrite the URL as http://ift.tt/1JWeFVx, but I need this to apply to any alphanumeric input, for instance:

No request:
    http://example.com -> http://ift.tt/1oq2mTb
Anything else:
    http://ift.tt/1GVjyYG -> http://ift.tt/1JWeFoi

Thanks in advance :)

Aucun commentaire:

Enregistrer un commentaire