Free Web Hosting Forum
(#1)
Old
Leates Leates is offline
Member
Leates is on a distinguished road
 
Posts: 32
Join Date: May 2011
Post .htaccess - 08-06-2011, 10:43 PM

Hi, I need some help with .htaccess.

I am trying to get one of my directories only accessible by the staff members of my site, using IP adresses and .htaccess.

It seems to be working, but the errordocument isn't appearing for the users that aren't allowed to access, they are just being redirected to http://error404.000webhost.com/?

The ErrorDocument section of my .htaccess file is this:
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html

And yes, there are also 403.html and 404.html pages in the public_html folder AND the directory.

Many Thanks
Leates
Reply With Quote
(#2)
Old
shekii shekii is offline
Junior Member
shekii is on a distinguished road
 
Posts: 24
Join Date: Jun 2011
Default 08-06-2011, 11:12 PM

The same is happening to me I haven't changed anything .htaccess.

Could a staff member help us?
Reply With Quote
(#3)
Old
Leates Leates is offline
Member
Leates is on a distinguished road
 
Posts: 32
Join Date: May 2011
Default 08-06-2011, 11:40 PM

Any staff members able to help?
Reply With Quote
(#4)
Old
drums's Avatar
drums drums is offline
Senior Member
drums is on a distinguished road
 
Posts: 579
Join Date: Aug 2010
Location: Oz
Default 08-07-2011, 12:48 AM

How did you create your .htaccess file and put it on the server? Sometimes if it's not created in a proper (raw) text editor, then it can create problems.

What else is in your .htaccess? Can you post the whole htaccess file (replacing #'s for any "sensitive" information)
Reply With Quote
(#5)
Old
shekii shekii is offline
Junior Member
shekii is on a distinguished road
 
Posts: 24
Join Date: Jun 2011
Default 08-07-2011, 11:40 AM

Here have a look.

Quote:
Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
# MediaTemple, it is known to cause random Internal Server
# errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
# the setting enabled in the Admin CP and you have this file
# named .htaccess
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&mo nth=$3&day=$4 [L,QSA]
RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

<IfModule mod_env.c>
SetEnv SEO_SUPPORT 1
</IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>
Reply With Quote
(#6)
Old
Leates Leates is offline
Member
Leates is on a distinguished road
 
Posts: 32
Join Date: May 2011
Default 08-07-2011, 05:47 PM

Mine was created and is edited in Notepad.

The one in the staff only directory is:

ErrorDocument 403 /403.html
ErrorDocument 404 /404.html

deny, allow

deny from all

allow from #.#.#.#


The one in the public_html folder is

ErrorDocument 403 /403.html
ErrorDocument 404 /404.html


Many Thanks
Leates
Reply With Quote
(#7)
Old
Leates Leates is offline
Member
Leates is on a distinguished road
 
Posts: 32
Join Date: May 2011
Default 08-07-2011, 06:24 PM

Bump Thread
Reply With Quote
(#8)
Old
you10's Avatar
you10 you10 is offline
Senior Member
you10 is on a distinguished road
 
Posts: 272
Join Date: Mar 2011
Location: England, UK
Default 08-07-2011, 07:10 PM

Quote:
Originally Posted by Leates View Post
Mine was created and is edited in Notepad.

The one in the staff only directory is:

ErrorDocument 403 /403.html
ErrorDocument 404 /404.html

deny, allow

deny from all

allow from #.#.#.#


The one in the public_html folder is

ErrorDocument 403 /403.html
ErrorDocument 404 /404.html


Many Thanks
Leates
In the staff only directory is there a 403.html and a 404.html file.



If you need help just ask

If I have helped you please give me karma
Reply With Quote
(#9)
Old
Leates Leates is offline
Member
Leates is on a distinguished road
 
Posts: 32
Join Date: May 2011
Default 08-07-2011, 07:19 PM

Quote:
Originally Posted by you10 View Post
In the staff only directory is there a 403.html and a 404.html file.
Yes, there is.
Reply With Quote
(#10)
Old
Leates Leates is offline
Member
Leates is on a distinguished road
 
Posts: 32
Join Date: May 2011
Default 08-07-2011, 09:43 PM

Anyone that can help?

Apparently this is bumping.

It was not intended, and I find it funny how the moderator just said it was bumping and did not help.

Last edited by Leates; 08-08-2011 at 11:52 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com