Anyone can help me with mod rewrite problem. I want to do following task www.abc.com?id=123 -> www.abc.com/123 Thanks in advance
You may want to try: RewriteEngine on RewriteRule ^([0-9]+) /?id=$1 Code (markup): A little less typing
Wont that send any URL domain.com/?id=123890hjaksd to /123890hjaksd Correct me if I'm wrong (and I could easily be as I'm not an expert in mod_rewrite), but isn't that backwards to what he wants?
yes, that is entirely the wrong way around, sorry ; RewriteEngine on RewriteRule ^(.*)$ /?id=$1 would be correct.....
I wouldn't use wildcards when he only need numbers. RewriteEngine On RewriteRule ^([0-9]+)$ /?id=$1 Code (markup):
he never actually mentioned that only numbers were used.....so I'd rather give him something that will definately work.....that is once I got my mistakes out of the way