Page 1 of 1
Redirect URL
Posted: Thu Jul 14, 2005 9:51 pm
by anjanesh
If someone enters the url mydomain.com/AAA I want it to redirect to mydomain.com?id=AAA
There is no folder called AAA
Any way to detect this other than using htaccess ?
Thanks
Posted: Fri Jul 15, 2005 12:19 am
by s.dot
I asked a question similar to this.
I believe the only way is to use mod_rewrite in your .htaccess file.
So, I don't believe their is any other way.
Posted: Fri Jul 15, 2005 12:21 am
by s.dot
just a brainstorm here
perhaps make a custom 404 page (that will come up when they type in the URL that's not valid such as domain.com/AAA)
include a PHP script at the top of the 404 page, that uses a regex to determine what's after the / in the URL they entered. Then use a header("Location: page.php?var=$typedinurl");
Just an idea though, I have no clue if it would actually work.