Forbidden Access

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
amao
Forum Newbie
Posts: 21
Joined: Sun May 10, 2009 5:13 am

Forbidden Access

Post by amao »

hi all I am using mod_rewrite
with .htaccess contain

Code: Select all

 
# This folder does not require access over HTTP
 
# (the following directive denies access by default)
Order allow,deny
 
RewriteEngine on
RewriteRule ^bob\.html$ /alice.html [L]
 
please help
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Forbidden Access

Post by jackpf »

Help with what?
amao
Forum Newbie
Posts: 21
Joined: Sun May 10, 2009 5:13 am

Re: Forbidden Access

Post by amao »

Sorry , when I try to access any bob.html
give me forbidden access 403
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Forbidden Access

Post by requinix »

Seriously.

Code: Select all

# (the following directive denies access by default)
amao
Forum Newbie
Posts: 21
Joined: Sun May 10, 2009 5:13 am

Re: Forbidden Access

Post by amao »

tasairis wrote:Seriously.

Code: Select all

# (the following directive denies access by default)
I removed this line but still not working
sorry I am new in php
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Forbidden Access

Post by jackpf »

Ok, 1 that line is a comment so won't do anything.
2, this is apache, not php.

And 3, you're denying access to the directory, so trying to rewrite urls to there is not going to work.
amao
Forum Newbie
Posts: 21
Joined: Sun May 10, 2009 5:13 am

Re: Forbidden Access

Post by amao »

jackpf wrote:Ok, 1 that line is a comment so won't do anything.
2, this is apache, not php.

And 3, you're denying access to the directory, so trying to rewrite urls to there is not going to work.
thanks Jackpf I solved it by adding
<Directory /www>
Order Allow,Deny
</Directory>
but now I got this error when I try to access any page
nternal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Forbidden Access

Post by jackpf »

Why don't you give it a go.
Post Reply