I have set up a php script to receive url data like this:
http://giffgaff.liamwli.co.uk/?name=liamwli
I want to make it so that I can go to
http://giffgaff.liamwli.co.uk/liamwli
And it would be re-written accordingly.
I have tried multiple online generators and none worked, so how would I go about doing this?
Remember that URL Rewrites are technically for URLs, not query parameters.
That said, there’s a way to do this using RewriteCond to match on the QUERY_STRING:
This should grab the value of name and populate it in the rewrite rule.
EDIT Oh crap I got your request backwards. OK you actually want to do something like this:
Also, this is more of a ServerFault question since it’s not really programming related.