Jump to content

Apache doesn't pick up .htaccess


Recommended Posts

You need to change the [b]AllowOverride[/b] setting to [b]All[/b] which is located near line 280 in the httpd.conf file.

The following is what you'll want to look for:
[code]#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride[/code]

Now save your httpd.conf file and restart Apache. You should beable to use .htaccess files.
Link to comment
Share on other sites

Did you restart Apache? after making the changes and made sure there wasn't any #'s in front of the lines you edited if ther is then remove the # as these are comments and so APache ignore these lines.

Now save the httpd.conf file and restart Apache. Also make sure your .htaccess folder in the root of the folder thgat stores your files to be seen by the webserver.
Link to comment
Share on other sites

Yeah, I did restart Apache with changes, and the lines aren't commented out.

Ive uploaded my httpd.conf at [a href=\"http://www.stephenknox.com/httpd.conf\" target=\"_blank\"]http://www.stephenknox.com/httpd.conf[/a] if someone would be so kind as to look at it!

Other than that, I'm completely stuck with this problem.

Thanks
Stephen
Link to comment
Share on other sites

Are you trying to view your .htaccess file when you go to [a href=\"http://localhost/\" target=\"_blank\"]http://localhost/[/a] and then from the list of files find your .htaccess file?

If so then Apache hides these files. If you want it to be viewable then commnent out the following:
[code]<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>[/code]So its just:
[code]#<Files ~ "^\.ht">
#    Order allow,deny
#    Deny from all
#    Satisfy All
#</Files>[/code]
Now save and restart Apache. You should be able to see your .htaccess file listed with all your other files.

Even though yoiur .htaccess file is not viewable APache will still use the .htaccess file it just hides it from users for security purposes as it can contain private information which you may not want your visitors to see.
Link to comment
Share on other sites

No, I'm trying to use .htaccess in the normal way - for mod_rewrite etc.

I set up the following .htaccess:
[code]RedirectMatch page1\.html page2.html[/code]

but when I go to localhost/test/page1.html (the .htaccess is placed in /test), it doesnt redirect to page2

Thanks for your answers so far,
Stephen
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.