Reputation:
I need your help in creating dynamic URL for SEO gains.. I tried to implement the following .htaccess on my present URL. But I got an 500 Internal Server Error
please where could the problem be? Thanks
Link
http://127.0.0.1/index.php?id=1
.htaccess
RewriteEngine on
RewriteRule ^index/([a-zA-Z0-9]+)/$ index.php?id=$1
Apache Error Log
Invalid Command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Upvotes: 1
Views: 2280
Reputation: 8218
Replace your rule with
RewriteRule ^index/([a-zA-Z0-9]+)/$ index.php?id=$1 [L]
a-Z
doesn't work the way one might think it does, and A-z
is just weird. That's what's throwing the error.
Also, adding the [L]
flag prevents further rewriting.
Upvotes: 2