I know there is a way to do this, but I can't figure out how Drupal's doing it in their code and I've made a few Google searches and can't seem to find what I'm looking for.

I am building a site where I want to pass out links that have a 'key' in them. And if I pass one of those URLs, it should hit the index.php file and read that key somehow. I believe I'll need to do a combination of things with the .htaccess file and with my PHP code on the index.php file, but I just don't know how to do it.

.com/TyNyYKjEeB3sracrjkAE

should redirect to...

.com/index.php

Any help?

Thanks,
Shaun

    its usually done with mod_rewrite in a .htaccess file

      I figured that was part of it. Can you or someone else help me out; what exactly do I put in the .htaccess file, and then what's left to do with the PHP?

        RewriteEngine ON

        redirect all traffic to the index page

        RewriteRule .*$ index.php [L]

        then in index.php you deal with the urls

        thers lots of pages on this, just ask Mr Google.

          Write a Reply...