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.
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/
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
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/
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/