Jump to content

[SOLVED] configure apache for mod rewrite


B34ST

Recommended Posts

hi i recently found that i can use mod rewrite on my paid domain simply by editing the .htaccess and can get this to work but i have a problem when it comes to using it on my localhost I have tried to do the following:

 

uncomment the line LoadModule rewrite_module modules/mod_rewrite.so in httpd.conf

 

then adding a new .htaccess file in a test folder with a test script that has a $_GET function in the .htaccess file i added:

 

RewriteEngine On

RewriteRule ^r/([^/]*)\.html$ /test/test.php?r=$1 [L]

 

therefore if i goto http://localhost/r/true.html it should be the same as http://localhost/test/test.php?r=true but instead i get 404:not found

 

I read somewhere that i should also make sure the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out. but i do not seem to have these lines in my httpd.conf file.

 

Can anyone help me to get this to work?

Link to comment
Share on other sites

I have just found the answer. Here it is for anyone that is interested:

 

aswell as what I have explained above I had to find the line:

 

AllowOverride None

 

and change it to:

 

AllowOverride ALL

 

now mod_rewrite works fine.

 

Thanks for your time anyway

Link to comment
Share on other sites

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.