I need to get a value from a url without the server displaying the page. For example, if someone goes to:
I want to get “123456” and redirect to http://www.example.com.
http://www.example.com/123456 does not exist.
Is this possible with mod rewrite and PHP somehow?
For example in your .htaccess file (assumes LAMP with mod_rewrite):
And index.php:
This setup will redirect all requests which don’t point to an actual file or directory to index.php.