Forums / General Questions / .htaccess not working???

.htaccess not working???

Locked

Views: 776

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
28 May 2009, 1:22 PM
#1
imfsub12 avatar

imfsub12

Zen Follower

Join Date:
Aug 2008
Location:
Halifax, NS
Posts:
274
Plugin Contributions:
0

.htaccess not working???

Yes i'm trying to get my .htaccess file working on a pleask sever..

It just a basic one that i'm using..

<Files *.php>
Order Deny,Allow
Deny from all
</Files>

<Files *.txt>
Order Deny,Allow
Deny from all
</Files>

WHen i put it up i get the lovely

Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404

Apache/2.2.4 (Linux/SUSE)

28 May 2009, 7:04 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: .htaccess not working???

Have you asked your hosting company why adding a FILES directive to your .htaccess is throwing errors? It could be that they've restricted that sort of thing in their server configuration, and you'll have to work with them to find a suitable workaround.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 May 2009, 7:09 PM
#3
imfsub12 avatar

imfsub12

Zen Follower

Join Date:
Aug 2008
Location:
Halifax, NS
Posts:
274
Plugin Contributions:
0

Re: .htaccess not working???

I did manage to get a SEO .htaccess file for a mod working.. but this simple on won't work..

unless they have somehting blocked for this code that i'm using..

ARGGG..

28 May 2009, 7:36 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: .htaccess not working???

For FILES directives to work, the host must have set the AllowOverride option to "Limit" or "All" in the server's Apache httpd.conf settings.
That's something you have no control over.

You can read up on the topic by searching for .htaccess on the Apache website.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.