stephenk Posted April 9, 2006 Share Posted April 9, 2006 When I place the a simple .htaccess file in my root, apache doesn't seem to pick it up at all. I have "AccessFileName .htaccess" in httpd.conf and was just wondering if there are any obvious points I'm missing?Thanks for any helpStephen Quote Link to comment https://forums.phpfreaks.com/topic/6955-apache-doesnt-pick-up-htaccess/ Share on other sites More sharing options...
wildteen88 Posted April 9, 2006 Share Posted April 9, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/6955-apache-doesnt-pick-up-htaccess/#findComment-25276 Share on other sites More sharing options...
stephenk Posted April 9, 2006 Author Share Posted April 9, 2006 Thanks for your reply - but that is already set in my httpd.conf file.My httpd.conf is the WAMP version, would that have changed any major settings needed for .htaccess to work?Stephen Quote Link to comment https://forums.phpfreaks.com/topic/6955-apache-doesnt-pick-up-htaccess/#findComment-25280 Share on other sites More sharing options...
wildteen88 Posted April 10, 2006 Share Posted April 10, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/6955-apache-doesnt-pick-up-htaccess/#findComment-25436 Share on other sites More sharing options...
stephenk Posted April 10, 2006 Author Share Posted April 10, 2006 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.ThanksStephen Quote Link to comment https://forums.phpfreaks.com/topic/6955-apache-doesnt-pick-up-htaccess/#findComment-25460 Share on other sites More sharing options...
wildteen88 Posted April 10, 2006 Share Posted April 10, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/6955-apache-doesnt-pick-up-htaccess/#findComment-25462 Share on other sites More sharing options...
stephenk Posted April 10, 2006 Author Share Posted April 10, 2006 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 page2Thanks for your answers so far,Stephen Quote Link to comment https://forums.phpfreaks.com/topic/6955-apache-doesnt-pick-up-htaccess/#findComment-25477 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.