Problem with htaccess

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

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.
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.
please help.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Post the .htaccess file, as well as where you are putting it in the
filesystem and what you are trying to access from the browser (the
original URL). Also, do you have an index document and do you know it
will be loaded automatically?

Good luck.

sina saeedi82 wrote:
> I have a problem.
> I installed mod_rewrite but when I put a .htaccess in my localhost, i
> get this error:
>
> Code:
> --------------------
> 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.
> 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.
> please help.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJKkpkLAAoJEF+XTK08PnB5KGAQAMOJpF2IAgwsE+NduRXDGkUO
GIuwZbEArSYtgmr8rVdTNta7F45zI6kvG5hkWAe8jy3FXCCAb8hdApk6jEdRUNOn
fdEKl54SMOBUNm5cOHZvRHOGQzPyArxjQcW1y0x6VlHURtb60BlBJfye+1wC/n+x
IUT7cX+JM+nc4sWI0zBpJG4RNclVgjkUKsZooB/yo4Wqe9QL04gMF8yZF/eq3HPh
wnPLlAnIs4/z1tqBJ9e/XnZMCfWYigc9BGdgUEeJn+ACYX+Nus9wU4E+lFn08J2B
q5zFxnNKNZ0VtKQmdZacfUUyDXPSi3zz5wz54JO28UKQ3bGyTvc/8rl/PwZzi7te
DBJIcb02Qj7JoYNydTkiMzvkHrXHgnPWEddfti2+ABzQVc8ITDiMqWIAIOIm5Wbc
Euoq10WxChTLOGUetI8jp2qIBTyyyfWjr+tDqor7VzXmFxRK0W2gYdWfZRCi2k9W
6Eexb4OQ269FMZhWpnTLEiitVVriX7/xHY43jlqqRcSDQNGgYnljjNPDX/446wiK
fmygIDeP/7A56v+wRcyiFS8SWe7FePICLAbEqXuTBiZ3mp4FfoPt4AYARZbQ4jb4
6hgyZ0jT0B8RxgHudOXP4gFVCmGBRNqTNKHXlCJP0qbxuoWTeyg+FyIuUIQRK/rI
vzJ8Iq9mK7oJRSM0/J82
=8ZR9
-----END PGP SIGNATURE-----

RewriteEngine on
RewriteRule ^/?test\.html$ test.php [L]

Its just a test to redirect test.html to test.php
But i got error.

I put it in “/srv/www/htdocs” folder.
When I tried “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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can you access the test.php file directly? Post what you get in
/var/log/apache2/error_log and /var/log/apache2/access_log when you get
this error.

Good luck.

sina saeedi82 wrote:
> Code:
> --------------------
> RewriteEngine on
> RewriteRule ^/?test.html$ test.php [L]
> --------------------
>
>
> Its just a test to redirect test.html to test.php
> But i got error.
>
> I put it in “/srv/www/htdocs” folder.
> When I tried “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
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJKkqW5AAoJEF+XTK08PnB5yvcP/2t8+8QIybTx1CJa9fT8V3qf
ddGJOMrCm0bj3huETaOwJJUhPeShrbxb7XPJAvyns/n3gYtb7ZCNzIjjboc3AVK0
5tEteGSOnHgM2jC4Aalys2ClrIs7/4DesqNvOvnbfzkoE8ShDEsiYEdvKfcfjrDL
4TYc6q6u6753sIa4GNKtvUWgzNTm3J3CWB/b58RdBCM1RQ0ACB6nrdbEaZGsvIfN
S5HrwJxMmjhza/bJaaMRIZzrGZ7s/lstnfO3q8+sCWU4MkcBpBw1LGfmlKEuiL8L
UfaV/OKTdINmuubuxxy5LRWYO/j0QHFTJ4d0dIu1jfEhRJ366z3XP9OGlEjgJ90W
RoPLHUWo9MNfJwHlHKqQ0cyRzsTuiImWj7ighOWnbuki9gyeJfdL1AUsCCWSATMs
DbRjLOGR5Ek4CtZ1SLuaAnhUkBMQg0ju0N31RchRovwqAX86kF3L2p+03+7SiBbK
+RDQgnE2r3nEHhSimTaLtFTTFtE1+8MkiK4sG7NqTieQZm/173PxptqdQremBkKh
sRh0ygKALDylOUOl6GlfVgR/6xjhk5Xxg4CNQX81k0J/d5DFQ0c1dmQwIdAo2TXc
QRkbUDWN7S+zVmyui1jIJmLQaJ9YBdIgDhyy7w+1XeZeahnztplamTOPtI9VB9N+
G1D5FadAn+q8qzvHpALA
=plpN
-----END PGP SIGNATURE-----

yest I can access all of my local web sites without htaccess
Both the logs are empty

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Empty? I’ve never seen those files empty. Are you sure you had rights to
read them? Things could be different with your versions but my access_log
shows every request made to the server, ever, and so if you are getting
anything (including an error) it should show up in there.

Good luck.

sina saeedi82 wrote:
> yest I can access all of my local web sites without htaccess
> Both the logs are empty
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJKksKjAAoJEF+XTK08PnB567gP/0FVoUOaNUbRjUBOutB/6SHl
G3uwMfCECsrkuBXjF8w9+VGVKVTVJV97ZxR364+ezOG9b5mrhfP6f6VeHJDebYI2
wwW3aZ6C4kKBXuUUxh6SMrxVy5QoLugM4ZG8x4L0G0H0m/926ykdvyvr62JhrPjW
2pagRHj5efIPJe37q8dOY3F6OwwiYdlsi/bSNvZ+z4XkIT1htb8JRYjwtiBDxX0o
QtXWmBzsIu1UIPKElM/RuW+seB4KTLzjPUWNnaQj6TJkDZfZtxVBDwRIcBh7bm+B
Uvv4vvU9qzeJDJ3ZiSmny20zhTtV2asJBrUtmZrFHnUUqi0IfcOD5Ox4jbWBotWy
Z7xo+4c1D62VydohHVszIRKkySdsxw1CfgKwnN/NS1EpcoN8+sLuJN6zb9+Rc6nY
ud80OgSjhB0EmA+TIcNIuOsEJSEadzjRcGFFdHnhZbeAsrwlHjFau/LCYFZoZagN
PeS42wTzBRAYpvbq6FpuhK3/Y0+dCu5IAUQk0Dzq07dPFEtstZbG50JEPZ+GTj8v
3E1/5aZsDqJp/VMD9mx+DJhSfKUEHZN823BK7hFHxnnjNUdclvC0KER9lYGeAslV
XQom+ku1fYXFtNgcJgSI9DKy3ihxKMa1sSpVt7Jo9ci0yTOsC4faf61E8vA3Yxod
iAOYwFSMAC1cq8y+p6Ai
=57jS
-----END PGP SIGNATURE-----