Jump to content

Ho to enable mod_rewrite


ryy705

Recommended Posts

Hello,

I am a mod_rewrite noob who got stuck on the first step.  How do I enable mod_rewrite?  I added the line "RewriteEngine On" in the apache2.conf file but when I restart apache I get following message: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

 

What am I doing wrong?  Many thanks in advance.

Link to comment
Share on other sites

Thank you for your response.

I am using kubuntu. I and I just installed mod_rewrite, placed the 'RewriteEngine On' line in apache2.conf file and restarted apache with without a problem.  But .htaccess doesn't seem to be working. I placed the line 'InvalidDirective Here' in the .htaccess file.  But I can still load the pages in that folder.  Is this because I am running everything on local computer?  I have this line in the apache2.conf file: 'AccessFileName .htaccess'.  Does this mean that .htaccess is enabled?

Link to comment
Share on other sites

I followed the instructions. Then I created a .htaccess file with the following lines in it:

 

AuthUserFile /usr/local/you/safedir/.htpasswd

AuthGroupFile /dev/null

AuthName EnterPassword

AuthType Basic

 

require user wsabstract

 

 

But I can go to that directory without being asked for a password.  Do you need to see a copy of any of the configuration files?

PS.  I did not create a password file.  But I don't think that matters.  Thank you.

Link to comment
Share on other sites

  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.