[INFO] [HTAccess] - Does Not Fall Inside Current Context

bh-tech

Well-Known Member
#1
Hi,

I have noticed in our error log we get over 2,000 of these lines below. From what I can see they are redirects from our .htaccess. And it's checking to see if they fall inside the directory '/cgi-bin'. But it also checks other directories, each time with over 2,000 of these lines. The htaccess file that it is reading form is on the top level.

Is there a reason it's even checking to see if the redirect rules fall inside the current context?

It fills up our error log very quickly and sometimes I believe it effects the performance of the site because it is writing so much to the log.

Code:
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2188] Redirect URL [*path1*] does not fall inside current context [/cgi-bin/], ignore!
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2189] Redirect URL [*path2*] does not fall inside current context [/cgi-bin/], ignore!
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2190] Redirect URL [*path3*] does not fall inside current context [/cgi-bin/], ignore!
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2194] Redirect URL [*path4*] does not fall inside current context [/cgi-bin/], ignore!
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2195] Redirect URL [*path5*] does not fall inside current context [/cgi-bin/], ignore!
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2196] Redirect URL [*path6*] does not fall inside current context [/cgi-bin/], ignore!
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2199] Redirect URL [*path7*] does not fall inside current context [/cgi-bin/], ignore!
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2200] Redirect URL [*path8*] does not fall inside current context [/cgi-bin/], ignore!
I have substituted the redirect paths with *pathX*.

Any advice is welcome.

Thanks,
BH-Tech
 

bh-tech

Well-Known Member
#3
Hi,

The .htaccess in /home/public_html/cgi-bin/ is only 5 lines long - that's the strange thing.

The .htaccess that it's actually looking at is located at /home/public_html/.htaccess

Do you want the corresponding lines from that .htaccess?
 

bh-tech

Well-Known Member
#5
From the .htaccess, it's only checking 'redirect 301' lines.

They are just general 301 redirects - nothing really special about them.

Code:
redirect 301 /forums/www.recalls.gov.au  http://www.domain.com/forums/forumdisplay.php?f=436
redirect 301 /reviews/browse/eczema_products http://www.domain.com/reviews/browse/eczema_relief_products
 

mistwang

LiteSpeed Staff
#6
those redirect directives has no effect if put in /cgi-bin/.htaccess, as the URL does not start with "/cgi-bin/", you can only put those in the .../public_html/.htaccess .
but it should not generate 2000 lines of error for that. we may need to login to take a look.
 

bh-tech

Well-Known Member
#7
Apologies, those redirect lines are from /public_html/.htaccess - they are just an example of two of the 2000 redirect lines in the /public_html/.htaccess. I understand that this is a lot of redirect lines, however we are an older site and have accumulated a lot over the past 10 years.

The /public_html/cgi-bin/.htaccess only has this in it

Code:
#PROTECT [Directory Name]
<Files *.php>
Order Allow, Deny
Deny from all
</Files>
 

NiteWave

Administrator
#8
can you try:
put
RewriteEngine Off
to top of public_html/cgi-bin/.htaccess
see if the error message will be gone.
just a workaround for test purpose.
 

bh-tech

Well-Known Member
#10
Please do

/usr/local/lsws/admin/misc/lsup.sh -f -v 4.2.20

should have been fixed.
We are already running 4.2.20 - is there another release?

I have found that it is only logging these lines when I upload our .htaccess.

I also found that it is only 'checking' two directories to see if 'it' falls inside the current context.

I will try adding RewriteEngine Off to the /cgi-bin/.htaccess and then upload the main .htaccess
 

NiteWave

Administrator
#11
>We are already running 4.2.20 - is there another release?
release number is same, but binary is different. but minor difference.
when run that command, you get the latest binary which may just fix this particular issue.
 

bh-tech

Well-Known Member
#12
when run that command, you get the latest binary which may just fix this particular issue.
I have updated to the latest binary - but still see the 'does not fall inside current context' log lines when I update the .htaccess file.

Code:
14:53:13.094 [INFO] [HTAccess] [/home/public_html/articles/../../.htaccess:2122] Redirect URL [*path1*] does not fall inside current context [/articles/../../], ignore!
14:53:13.094 [INFO] [HTAccess] [/home/public_html/articles/../../.htaccess:2123] Redirect URL [*path2*] does not fall inside current context [/articles/../../], ignore!
14:53:13.094 [INFO] [HTAccess] [/home/public_html/articles/../../.htaccess:2124] Redirect URL [*path3*] does not fall inside current context [/articles/../../], ignore!
Any ideas?
 
#13
but the error message is different now. following /cgi-bin/ no longer exist in the log ?
12:00:51.226 [INFO] [HTAccess] [/home/public_html/cgi-bin/.htaccess:2188] Redirect URL [*path1*] does not fall inside current context [/cgi-bin/], ignore!

now new message:
14:53:13.094 [INFO] [HTAccess] [/home/public_html/articles/../../.htaccess:2122] Redirect URL [*path1*] does not fall inside current context [/articles/../../], ignore!

is there /home/public_html/articles/.htaccess exists ? if yes, what's the content of line 2122 ?
 

bh-tech

Well-Known Member
#14
The error message that had the '/cgi-bin/' in it has appeared to of stopped showing.

However, the '/articles/../../' error message was also happening before - but now it is the only one.

There is no .htaccess in the /articles/ directory.

The line numbers don't really correspond to anything more then the fact that it is a redirect 301 in the .htaccess. I'm only copying a few of the lines in the logs. The error messages start at 50 and go all the way up to 2203. As far as I can see - there is a log message for every single redirect 301 line in my root .htaccess.

I'm not sure where it's getting the '/articles/../../' from - and what I really don't understanding is why it's checking to see if the rules fall inside the current context. It's almost like it's building a cache of redirect 301's for the directory.
 

bh-tech

Well-Known Member
#15
Hi everyone,

We are running 4.2.21 now and still getting these messages throughout our error log.

Is there anything else I can do to try and fix this?

Thanks,
BH-Tech
 
Top