Reputation: 231
how would I rewrite in .htaccess:
url.com/NAME to url.com/view.php?=NAME
I've tried a couple of variations but I think i might be putting a slash in the wrong place. Any suggestions?
Upvotes: 0
Views: 28
Reputation: 362
RewriteEngine on
RewriteRule ^(\w+)$ /view.php?somevar=$1 [L]
You have to set NAME as the value of some variable.
This example allows NAME to be any word.. if you want something specific... just replace \w+ with whatever specific thing you want.
Upvotes: 1