I'm hoping someone could give some assistance with a .htaccess rewrite. I'm looking to have the last level in a domain path used as a variable and rewritten to another url. For instance http://domain.com/process/abcd would be http://domain.com/process/?abcd or http://domain.com/process/index.php?abcd The catch is that the "abcd" in the above url would be a variable and could be anything. So I'm always wanting everything after process/ to be used as a variable. Thanks in advance
thanks.. I have that a try and it didn't work. instead of taking the string after the / in that folder and using it a variable, it used index.php[L] so my url was domain.com/process/abcd and it rewrote it as var=index.php[L]
[L] at the end means stop processing any more rules. Not sure if it's a good idea, since there could be more rules below that. Also, from a SEO point of view it always makes sense to add R=301 so that Google would understand that it's a same page and increase its ranking/not punish for duplicate content. Anyway, just a sensible thing to do.
so what about RewriteRule ^process/(.*)$ index.php?var=$1[L] @zealus you are right , but i used it to make sure that it the only current rule for testing purpose