Hi, sorry if this is really basic but i'm a bit confused.
I currently use modrewrite as follows:
RewriteRule ^([0-9]+) http://www.mydomain.co.uk/?id=$1 [nc]
which as i'm sure you're aware turns this http://www.mydomain.co.uk/123 into http://www.mydomain.co.uk/?id=123
Well i have an issue because i'd like to have it kind of like an if statement:
i'd like http://www.mydomain.co.uk/cheese to rewrite to http://www.mydomain.co.uk/?name=cheese but if it's numeric as above http://www.mydomain.co.uk/123 to still go to http://www.mydomain.co.uk/?id=123
So the variable would be ?name= if text (and numeric, i'd still want it to be ?name= if the word after the / was cheese123cheese) but ?id= if solely numeric
is this possible?
hope that makes sense
I currently use modrewrite as follows:
RewriteRule ^([0-9]+) http://www.mydomain.co.uk/?id=$1 [nc]
which as i'm sure you're aware turns this http://www.mydomain.co.uk/123 into http://www.mydomain.co.uk/?id=123
Well i have an issue because i'd like to have it kind of like an if statement:
i'd like http://www.mydomain.co.uk/cheese to rewrite to http://www.mydomain.co.uk/?name=cheese but if it's numeric as above http://www.mydomain.co.uk/123 to still go to http://www.mydomain.co.uk/?id=123
So the variable would be ?name= if text (and numeric, i'd still want it to be ?name= if the word after the / was cheese123cheese) but ?id= if solely numeric
is this possible?
hope that makes sense