Author Topic: Server returns 301 for a valid directory  (Read 7943 times)

0 Members and 1 Guest are viewing this topic.

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Server returns 301 for a valid directory
« on: October 19, 2015, 01:27:32 PM »
I've been having a bit of an odd problem which may or may not be a bug.

On my server, I have a few webpages in the root, then a folder called "files".  The first few times each day when I browse to /files, however, I get "301 - Moved permanently to /files/"
If I click the "/files/" link, it "redirects" me to the same exact URL, which opens the page.
Here is a screenshot of this: http://i1090.photobucket.com/albums/i373/fun4youall/HFS_zps8frvamye.jpg (it's also attached)

Does anyone know why this might be happening?
Thanks!

Online Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1828
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #1 on: October 19, 2015, 01:59:26 PM »
You are using hfs 2.3f

upgrade to 2.3g or use the same with bug account corrected in my message
http://www.rejetto.com/forum/bug-reports/account-names/msg1060744/#msg1060744
it's equivalent version as rejetto with lower size by compressed with upx


question ; have you a redirect macro in your template or redirect url in some accounts ,  301 message can appear generaly in this case

I suppose that's your hfs server?
Quote
Quack, Quack

Unless you have webbed feet and a bill for a mouth, this site isn't for you.

If you already have an account, Click here. Don't have one?

 David    folder   10/14/2015 1:02:59 PM   6
Games    folder   10/1/2015 6:44:24 PM   2
Installers    folder   10/16/2015 7:16:00 PM   0
Johnny    folder   9/30/2015 12:06:02 PM   0
Portable    folder   10/12/2015 4:39:54 PM   0
Public    folder   9/30/2015 12:07:42 PM   0
Testing    folder   9/30/2015 12:04:42 PM   0
« Last Edit: October 19, 2015, 02:03:51 PM by Mars »
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #2 on: October 19, 2015, 02:13:52 PM »
Yes, I'm going to try g, but I have not gotten to do so yet.
The redirect option for user accounts didn't seem to be working, so I have the user try to open a protected "login" page, so they must log in. Once they log in, that page loads, and a 5-second delayed redirect takes over.  There is also a simple anchor tag link, if the user doesn't want to wait.  Either redirect takes them to /files.

Note that this is an experimental/proof on concept server, so not everything is set up in an ideal fashion for public use.

Thanks for the prompt response!

I hope this isn't a duplicate post.  I'm having a little trouble with your website.

Online Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1828
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #3 on: October 19, 2015, 02:31:08 PM »
if you use a link to redirect logged users, you have to end url with a "/" for folders

http:// xxx.xxx.xxx.xxx/files/

under /files/ create a temporaly protected folder to a new user "test" with "test" as password , i will see if by clicking you link i can reproduce
« Last Edit: October 19, 2015, 02:37:21 PM by Mars »
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #4 on: October 20, 2015, 12:05:03 AM »
I believe I did use a "/" at the end.  If you look at the screenshot, that is what is in the address bar.
I added that user and pass to the main system, so you have a better chance of getting the same error.  You have access to home, login, and files, but not the sub-directories.

Thanks for your help!

Online Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1828
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #5 on: October 20, 2015, 09:30:16 AM »
at first connection , after login  redirected perfectly to /files/

no error under Firefox and Chome

for me , all is right
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #6 on: October 20, 2015, 01:37:40 PM »
It works fine for me about 70% of the time.  If it works, it will continue to for some time.  When it doesn't work is when I am connecting to it after not using it for some time.  I do not expect it.

Offline bmartino1

  • Insane poster
  • *****
  • Posts: 783
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: Server returns 301 for a valid directory
« Reply #7 on: October 20, 2015, 08:32:57 PM »
dave, when you connect to it, are you on the same computer as the HFS program / site?
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #8 on: October 20, 2015, 08:55:04 PM »
I am never on the same computer--it runs from a dedicated server computer.  However, I am sometimes connecting from the LAN to the external IP, which sends me back into the LAN.
However, this happens from outside networks as well.  Another user reported the problem to me from his, and I have seen this myself.  The screenshot I provided was actually from another network, as well.

I am beginning to suspect that it is more likely to happen after restarting the server.  My next restart is scheduled for Wednesday, when I upgrade to subversion G.  Perhaps we will see then?

Offline bmartino1

  • Insane poster
  • *****
  • Posts: 783
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: Server returns 301 for a valid directory
« Reply #9 on: October 21, 2015, 07:50:11 PM »
alright, thank you for confirming that it not just a local network causing this error as that can be a cause for this..., my next question is, are you using HFS default template, or did you load a template or use the different template tab for this folder?

What i'm trying to get at is when you click on the link it takes you to this error, where where you be fore this page?
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #10 on: October 22, 2015, 01:39:40 PM »
I am using the default template, but I have added two simple pages.  These are files, not custom code entered into the server.  When I get the error, am coming from a custom webpage, called login.

I touched on this before, but to be clear, it works something like this:
When you browse to the root, you will be shown an "index.html" file.  That file links to a protected page called login.  The user must log in to see that page, so the page itself thanks the user for logging in, and auto-redirects on delay to /files.  The user can also click a go now link.
It is at this jump from custom pages in the root to the subfolder /files, which opens the default page (file browser) that I am given a 301.


*Note: I said the server would update yesterday to version G, but something went wrong, and it didn't happen.  I will need to do it manually.  For now, I am still on F.*
« Last Edit: October 22, 2015, 02:49:50 PM by Dave987 »

Follow members gave a thank to your post:


Offline bmartino1

  • Insane poster
  • *****
  • Posts: 783
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: Server returns 301 for a valid directory
« Reply #11 on: October 22, 2015, 09:59:14 PM »
Ok, honestly, this sounds like a permissions issue to access the folder.

Possible permission issues:
HFS to windows file permission read/write?
user account error to aces file
? everyone over access
etc, it was just a thought, i don't think it is the issue...
« Last Edit: October 27, 2015, 02:32:12 AM by bmartino1 »
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #12 on: October 26, 2015, 01:41:58 PM »
Thanks for posting!
Permissions issue, as in, the users don't have access to that folder?  If so, then why does clicking on the redirect link work just fine?  Other times, browsing directly there works, too.  It's an interesting idea, but I'm not sure how that would be the case.  Care to elaborate?
Thanks again!

Offline Dave987

  • Regular poster
  • **
  • Posts: 25
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #13 on: October 27, 2015, 01:54:37 PM »
I've finally updated to 2.3g.  We'll see if this works. If not.... :o

Online Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1828
    • View Profile
Re: Server returns 301 for a valid directory
« Reply #14 on: October 27, 2015, 05:22:18 PM »
despite attempts to connect to your server, I still have not managed to implement this error 301, I remember in ancient times that this problem had already arrived but had been resolved by the application of a fix, so your current problem is quite incomprehensible
FRENCH MEMBER : Si vous comprenez la langue française,  n'hésitez pas à l'utiliser pour une meilleure aide de ma part