|
| Re: Redirect to a new sub dir but keep the original url. [message #1710 is a reply to message #1708] |
Fri, 26 February 2010 11:33  |
tommytx Messages: 6 Registered: February 2007 |
|
|
|
I have it almost working but I still need some help..please...
RewriteCond %{REQUEST_URI} ^/vabe_forcl_13a_id_100003
RewriteRule ^(.*)$ /adwords/?id=$1
I need to set the condition to pass a test.
Here is the incoming URL: thousands in this format
hxxp://www.mydomain.com/ches_forcl_13a_id_100003
hxxp://www.mydomain.com/norf_forcl_13a_id_100004
hxxp://www.mydomain.com/vabe_forcl_13a_id_100005
So it looks like its in the URI...this "ches_forcl_13a_id_100003"
The only thing that remains constant all the time for every url is the "_id_" portion
So what I need to do is satisfy the condition if the url has "_id_"
Is there a way to evaluate it like the following...
RewriteCond strpos(%{REQUEST URI},=="_id_")
In other words is there a way to satisfy the condition if the characters _id_ is in the URI or in the url anywhere for that matter.
The Rewrite rule works ok if the conditon is met it goes to /adwords and keeps the URI attached.
And the url keeps the original look "http://www.vahud.com/ches_forcl_13a_id_100003" even though it is actually in the /adwords directory.
The way it is, the condition is met but only for the specific one..vabe_forcl_13a_id_100003 and I will need to match thousands of urls using the _id_ that will be in every url.
|
|
|