0

I have a problem with my .htaccess file.

In my .htaccess file I have this:

RewriteEngine on

RewriteRule ^user/([0-9a-zA-Z]+) user.php?u=$1 [NC, L]

And it is placed in my C:/../wamp/www/mysite/

My site worked before I had this file, so I'm not sure what I'm doing wrong. I'm kind of new to this aswell so it's bound to go wrong. Whenever I run my site I get the error: Internal Server Error

"The server encountered an internal error or misconfiguration and was unable to complete your request."

Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
Denny123
  • 13
  • 2

1 Answers1

0

You haven't finished the rule, change it to:

RewriteRule ^user/([0-9a-zA-Z]+)$ user.php?u=$1 [NC,L]
#-------------------------------^

Okay, now that it looks like you haven't enabled the rewrite engine. Check .htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration for more information on how to enable it.

Update: If you are struggling with this, there's a Youtube video on how to do it: Youtube: How to enable rewrite module in WAMP Server?

Update: If you get Bad Flag Delimiters error, please don't give any spaces between the flags. For more information, see RewriteRule Error: Bad flag delimiters.

Community
  • 1
  • 1
Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252