1

When I put a .htaccess file in my root directory it gives me the following error:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator at admin@localhost to inform them of the time this error occurred, and the actions you performed just before this error.More information about this error may be available in the server error log."

Here is my .htaccess code:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /login/profile.php?username=$1

Basically the function of this code is like when user type his profile name in the url then it display the user profile page via the URI localhost/login/adam.

halfer
  • 19,824
  • 17
  • 99
  • 186
Sagar
  • 11
  • 2
  • 1
    Take at look at the error.log, it will most likely tell you what's wrong, or at least give helpful clues, which you can post as part of your question. – Perleone Jan 21 '13 at 21:10
  • this is my error code it says invalid comman 'RewriteEngine'[Mon Jan 21 15:55:03.865770 2013] [core:alert] [pid 7392:tid 824] [client 127.0.0.1:5281] C:/wamp/www/login/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/ [Mon Jan 21 16:18:12.482617 2013] [core:alert] [pid 7392:tid 824] [client 127.0.0.1:5505] C:/wamp/www/login/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration – Sagar Jan 21 '13 at 21:20
  • @user1978451 You haven't enabled the mod_rewrite Apache module. Read the documentation for your wamp implementation. Look at [this answer](http://stackoverflow.com/a/10891317/1779906). – Perleone Jan 21 '13 at 21:51
  • @Perleone You solve my query thank you i just follow the information which you gave and it's work fine – Sagar Jan 22 '13 at 14:01

0 Answers0