Welcome to WebmasterWorld Guest from 54.161.228.30

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

How to enable .htaccess in httpd.conf on Windows XP?

   
1:15 am on Jan 7, 2005 (gmt 0)

10+ Year Member



I'm a total beginner to Apache, i installed it on my pc with Windows XP (home edition).
Everything seems to be ok but it doesn't understand .htaccess directives (AddType, mod_rewrite) inside my virtual host.
What do i need to change in my httpd.conf to do it?
Thanks in advance.
2:50 am on Jan 7, 2005 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



GreenLeaf,

See the Apache AllowOverride and Options directives. You will need to set the FollowSymLinks Option, and set AllowOverride to allow both Options and any other functions you want to support, such as FileInfo.

If you are just experimenting and have no great security problems or multiple "users" to deal with, then set AllowOverride all and Options FollowSymLinks.

Also, you'll need to set the name of the htaccess file to "htaccess.txt" or similar in order to get along nicely with Windows' file-naming conventions.

Jim

2:53 am on Jan 7, 2005 (gmt 0)

10+ Year Member



I have mine set very liberally and on about line 269 of the apache config file you will see this:

# 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 All

The all directive allows all directives to be placed within an .htaccess file

about line 328 you will find:

# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

AccessFileName defines what the access filename will be ...I imagine you can name it anything you want but .htaccess is the norm.

9:22 pm on Jan 7, 2005 (gmt 0)

10+ Year Member



Thanks a lot for your advices but all the above didn't helped. :-((
I tried to put AllowOverride All in the server config context, then in the virtual host context; My Options were already set up to Indexes FollowSymLinks Includes.
I tried to set up AccessFileName htaccess.txt and renamed my .htaccess to htaccess.txt, - nothing besides 500 server error! And i know that my .htaccess is right because it works on my hosting server. And it doen't work on my home pc.
What could be the reason?
10:48 pm on Jan 7, 2005 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



> nothing besides 500 server error!

Look at your server error log. If you're getting a 500-Server Error, it will tell you why.

Jim

12:04 am on Jan 8, 2005 (gmt 0)

10+ Year Member



Thanks, Jim!
My rewrite_module wasn't uncommented!