Web Hosting Talk







View Full Version : .htaccess not working


namehog
11-28-2002, 12:28 PM
Hi,

Does anyone know how to make an htaccess file work without making errors on a Cobalt RaQ4 ???

I have been using them fine for years and all of a sudden on all my RaQ4's i cannot get it to work.

I just need a htaccess file to stop hot linking, or a section to put into the httpf.conf file which would be better.

Does anyone know???

CmptrWz
11-28-2002, 01:06 PM
The same section you put in a .htaccess file can be put in a directory segment of httpd.conf

However, if you open access.conf(/etc/httpd/conf/access.conf) and edit the allowoverride directive then you can enable more features of .htaccess files.

namehog
11-28-2002, 01:08 PM
brilliant thanks! ill give it a try!

raqtweak.com
11-28-2002, 03:17 PM
More specific:

add:
AllowOverride All
right under the:
<Directory /home/sites/*/>

Then restart Apache,
/etc/rc.d/init.d/httpd restart

nozol
11-30-2002, 10:08 AM
To allow .htaccess to work for a specific web sites, just do the following

login using ssh and su root
pico /etc/httpd/conf/access.conf

Add the following lines at the end of the file

<Directory /home/sites/siteNUMBER>
AllowOverride All
Options All
</Directory>


where siteNUMBER is the directory of the site you want.

then restart apache

/etc/rc.d/init.d/httpd restart

HPV
02-07-2003, 10:42 PM
boy di dthis thread jamm up my web server all I did was edit the access.conf like stated above and ... Whammo .. No web Server... can any one give me a little help!

Prowler
02-11-2003, 01:53 AM
Before you set out to modify any configuration file in any server, follow the drill:
Always backup your original configuration files and then set out to change the directives one at a time. In case things don't work out the way you want them, you can roll back to the earlier stage with little down time.
Another thing with Apache in some servers. They have many binaries compiled with different patches/modules in the same box but in different locations. Check out the binary directly where its config files /document root are located by issueing this at the command prompt:
./httpd -l
For RedHat you have a shell script to start/shutdown Apache in this location: /etc/rc.d/init.d/httpd
Find out where the original httpd binary resides and check its config files.