Problem with htaccess

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
sina_saeedi82
Forum Newbie
Posts: 11
Joined: Sun Aug 23, 2009 5:13 am

Problem with htaccess

Post by sina_saeedi82 »

I have a problem.
I installed mod_rewrite but when I put a .htaccess in my localhost, i get this error:

Code: Select all

Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
127.0.0.1
Mon Aug 24 13:03:21 2009
Apache/2.2.10 (Linux/SUSE)
When I remove .htaccess all the things work correctly.
please help.
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Problem with htaccess

Post by papa »

What does your htaccess file look like ?
sina_saeedi82
Forum Newbie
Posts: 11
Joined: Sun Aug 23, 2009 5:13 am

Re: Problem with htaccess

Post by sina_saeedi82 »

Code: Select all

RewriteEngine on
RewriteRule ^/?test\.html$ test.php [L]
Its just a test to redirect test.html to test.php
But i got error.
When I tried

Code: Select all

RewriteEngine on
I got the same error. I find out "RewriteRule" is not important, when the "RewriteEngine" is "ON" I get error. When I turn it off all the things work correctly.
I have openSUSE 11.1 with apache 2
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Problem with htaccess

Post by Ambush Commander »

It sounds like your server may not have mod_rewrite installed. Talk to your host?
Post Reply