| View previous topic :: View next topic |
| Author |
Message |
JSLover
Joined: 20 Dec 2004 Posts: 541 Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...
|
Posted: Wed Jan 25, 2006 2:19 pm Post subject: Titan: About file.AutoHotkey.net urls |
|
|
I noticed you linking to file.autohotkey.net/<user> a while ago, now I see you are linking in your WWW button...I was wondering if you use a redirect because you want to or if you would mind changing it to serve from that url...example...
Go to...file.autohotkey.net/Titan...get redirected to...autohotkey.net/file/users/Members/Titan
...now, while I've been wondering why it's /users/ & then /Members/...what this is really about is making it stay on the 1st url & work & not redirect...assuming you have Apache & mod_rewrite...you should be able to put this in an .htaccess...
| .htaccess in file.autohotkey.net's root dir wrote: | |
| Code: | RewriteEngine on
RewriteRule ^/(.*)$ /file/users/Members/$1 |
...assuming I did that correctly, it should serve the page under the subdomain instead of redirecting. _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Wed Jan 25, 2006 2:27 pm Post subject: |
|
|
I use the file subdomain as a redirect. I wanted to make it serve pages like you said but I thought it would be a bad idea. I've changed my mind and I will update it to your specs soon.
Btw. /file/users/Members/ is the file branch that the file manager engine uses. |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Wed Jan 25, 2006 2:36 pm Post subject: |
|
|
I'm not an expert at this but this is part of the code I'm using for the htaccess of autohotkey.net: | Code: | RewriteCond %{HTTP_HOST} ^file.autohotkey.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.file.autohotkey.net$
RewriteRule ^(.*)$ /file/users/Members/$1 |
For some reason the server generates an internal error 500 when the URL file.autohotkey.net/Titan is requested. |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 541 Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...
|
Posted: Wed Jan 25, 2006 3:19 pm Post subject: |
|
|
| Titan wrote: | | ...but I thought it would be a bad idea. |
...why would it be a bad idea?
| Titan wrote: | | Btw. /file/users/Members/ is the file branch that the file manager engine uses. |
...but why does it require both /users/ & /Members/ can't it pick one & know that below that is users OR members? For about 3 seconds I think I saw it only require /users/ (a while ago).
I'm not sure if you already made the changes, but file.autohotkey.net gets a cPanel error, this edit might fix that & make it a useful url too...
| .htaccess in file.autohotkey.net's root dir wrote: | |
| Code: | RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ /file
RewriteCond !%{REQUEST_URI} ^/$
RewriteRule ^/(.*)$ /file/users/Members/$1 |
...the 1st RewriteRule is intended to serve the same page as autohotkey.net/file...but those scripts could be picky being used from the subdomain, so you may need to really redirect...
| Code: | | RewriteRule ^/$ http://autohotkey.net/file [R] |
| Titan wrote: | | I'm not an expert at this but this is part of the code I'm using for the htaccess of autohotkey.net |
...if you put the .htaccess only under the file subdomain, it shouldn't need to check the HTTP_HOST.
One error could be...
| Code: | | RewriteRule ^(.*)$ /file/users/Members/$1 |
...you forgot a / in the ^(.*)$ part...that could make it include a / in the resulting rewrite...
Request: /Titan
Match: ^(.*)$
Result: /file/users/Members//Titan ...double slash in the result could be the 500 error. Make match be: ^/(.*)$ So $1 only contains after the /
Also, if you don't have "RewriteEngine on" before the Rules (or anywhere in the file), that could be the 500 error too (or just the Rewriting wouldn't take place without any error?).
If autohotkey.net points to the unix path (for example) /home/titan/www & file.autohotkey.net points to /home/titan/subdomains/file you would need to modify the redirect to ../ up the dirs to get to the www dir (or symlink /file under the subdomain to /home/titan/www/file)...like...
| Code: | RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ ../../www/file
RewriteCond !%{REQUEST_URI} ^/$
RewriteRule ^/(.*)$ ../../www/file/users/Members/$1 |
...I believe you are allowed to ../ up the directories, since it's in the .htaccess & not coming from an outside request. Easy fix might just be the symlink.../home/titan/subdomains/file/file -> /home/titan/www/file
Um...you might even be able to symlink /home/titan/subdomains/file -> /home/titan/www/file...& avoid the .htaccess rewrite altogether? _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Wed Jan 25, 2006 5:56 pm Post subject: |
|
|
| JSLover wrote: | | why does it require both /users/ & /Members/ can't it pick one & know that below that is users OR members? |
The file manager engine is under /file. There are three types of users: Admins, Members and Guests each with their respective directory under /users. I can remove the need for /Members but it would mean I'd have to edit the engine - which I wouldn't like to do just yet.
| JSLover wrote: | | Also, if you don't have "RewriteEngine on" before the Rules (or anywhere in the file), that could be the 500 error too (or just the Rewriting wouldn't take place without any error?). |
The 'RewriteEngine on' was always in my htaccess file.
| JSLover wrote: | | ...I believe you are allowed to ../ up the directories, since it's in the .htaccess & not coming from an outside request. Easy fix might just be the symlink.../home/titan/subdomains/file/file -> /home/titan/www/file |
Subdomains are configured by cpanel and their directory lies under public_html/[subdomain]. Since the subdomain file is synonimus with the directory name of where the file manager is stored, things become only more complicated - i.e. if you redirect everything, the file manager in itself would not work. I was thinking of other subdomains like code.autohotkey.net or user.autohotkey.net, what do you think? Could I still stick to file.autohotkey.net and then work out the htaccess carefully?
| JSLover wrote: | | double slash in the result could be the 500 error |
Thanks, I think that was the problem.
| JSLover wrote: | | I'm not sure if you already made the changes, but file.autohotkey.net gets a cPanel error, this edit might fix that & make it a useful url too... |
For some reason my web server gets tempremental and becomes extremely slow whenever I upload a htaccess file - it could be what I wrote in it this time but it never happened before.
I will continue to tweak the server untill it works as desired. Having no exprience whatsoever in Unix or Linux I'm not exactly sure I'm going about the right approach. If you read the stuff above prehaps you can shed some light as to what I should do
Thanks for your help. |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 541 Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...
|
Posted: Thu Jan 26, 2006 10:19 am Post subject: |
|
|
| Titan wrote: | | Subdomains are configured by cpanel and their directory lies under public_html/[subdomain]. |
If...
titan/public_html/index.html = autohotkey.net/index.html ...&...titan/public_html/file/index.php = autohotkey.net/file/index.php ...why doesn't...titan/public_html/file/index.php = file.autohotkey.net/index.php ...if they are the same dir, something isn't configured allowing file.autohotkey.net to be accessed directly (& serve the same content as autohotkey.net/file)...(currently tho file.autohotkey.net won't respond {or even ping}...it's completely gone?).
| Titan wrote: | | Since the subdomain file is synonimus with the directory name of where the file manager is stored, things become only more complicated |
...that should make (some) things easier...
| Titan wrote: | | - i.e. if you redirect everything, the file manager in itself would not work. |
...rewriting (if I'm thinking of the right mod) is different than redirecting (unless you force the redirecting aspect of it)...my example Rules aren't supposed to cause the url in the browser to change...they are only supposed to Rewrite where it looks on the server for the file.
| Titan wrote: | | I was thinking of other subdomains like code.autohotkey.net or user.autohotkey.net, what do you think? |
...I like user.* or host.*...but if it's possible to make it work on either of those, file.* should at least be possible too.
| Titan wrote: | | Could I still stick to file.autohotkey.net and then work out the htaccess carefully? |
...should be possible...the only thing I can suggest is for you to let me get in there & start testing (very carefully of course). I can only get it to work thru trial & error too, but I might understand more unix stuff.
| Titan wrote: | | Thanks, I think that was the problem. |
...but why is it completely not working now? file.* don't work (autohotkey.net works tho).
| Titan wrote: | | For some reason my web server gets tempremental and becomes extremely slow whenever I upload a htaccess file - it could be what I wrote in it this time but it never happened before. |
...I noticed that too earlier...I'd have to see the whole .htaccess file to see if the new Rules are conflicting with others...creating an infinite Rewrite.
| Titan wrote: | | Having no exprience whatsoever in Unix or Linux I'm not exactly sure I'm going about the right approach. |
...I can try to help in any way you feel comfortable letting me...does cPanel allow you to create other admin users (perhaps with limited editing abilities) or is it just one admin for all?...I just mean I wouldn't feel safe giving someone access to my site (so you probably wouldn't either), but if you could create an admin with only access to file.*'s .htaccess...you might feel better about letting me test. The only thing I can currently test with is directories, cuz with the hosting plan I have access to, I can't create subdomains.
I don't know the results of testing my previous .htaccess examples...but with the new info lemme try again...
| Code: | RewriteEngine on
RewriteCond %{HTTP_HOST} ^user.autohotkey.net$ [OR]
RewriteCond %{HTTP_HOST} ^users.autohotkey.net$ [OR]
RewriteCond %{HTTP_HOST} ^host.autohotkey.net$ [OR]
RewriteCond %{HTTP_HOST} ^file.autohotkey.net$
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^/[^\.\/]*.php
RewriteCond %{REQUEST_URI} !^/users
RewriteCond %{REQUEST_URI} !^/images
RewriteRule ^/(.*)$ /users/Members/$1 |
...before you apply this .htaccess, you need to make file.autohotkey.net act exactly like autohotkey.net/file...the root should see the login page & file.autohotkey.net/users/Members/Titan...should work (if the subdomain is really pointing at the same dir as autohotkey.net/file...it should {by default} work). Where have you been putting the .htaccess (unix path)? How did you add the file subdomain? When you create a subdomain & it creates the directory...can you re-point the subdomain to a different dir? Why don't the login come up when accessing the root of file.*? _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Thu Jan 26, 2006 5:42 pm Post subject: |
|
|
I spoke to my web server company about this and they fixed it. Turns out that I could only do redirects with htaccess and file pointing can only be done thru the main Apache configuration file - which I do not have access to -_-
So, file.autohotkey.net/Titan can be used to link to your file manager accounts. I will be posting this on the autohotkey.net news page soon. |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 541 Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...
|
Posted: Fri Jan 27, 2006 8:19 am Post subject: |
|
|
One issue...file.autohotkey.net...gets a 403 Forbidden...instead of echoing (or at the very least redirecting to) autohotkey.net/file.
Ok, 2 issues...the 404/403 errors are the default (but more helpful) error messages...instead of whatever custom message comes up for autohotkey.net/invalid...it'd also be nice if the custom message said 404 OR 403 not just "...was not found or you do not have permission to access it."...it can't tell me which?
So you made file.* stay there & go.* redirect? Is there a benefit to redirecting in some cases? Can you do user/users/host?
Ok...3 issues...go.autohotkey.net...redirects to a 403 (or 4?)...it could be made to redirect to autohotkey.net/file.
The news page makes it seem like file.autohotkey.net/username/file won't work (& go.* would)...but it appears too. _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Fri Jan 27, 2006 12:22 pm Post subject: |
|
|
| JSLover wrote: | One issue...file.autohotkey.net...gets a 403 Forbidden...instead of echoing (or at the very least redirecting to) autohotkey.net/file.
So you made file.* stay there & go.* redirect? Is there a benefit to redirecting in some cases? Can you do user/users/host? |
go.autohotkey.net and file.autohotkey.net now redirects to the file manager at autohotkey.net/file. I have also implimented error pages for 403/404.
The purpose of file. is obviously to have a shorter URL since it eleminates the need for /file/users/Members/*. The go. subdomain is quite pointless because it's the same thing but just a redirect - but this could be useful (i.e. hit counters or download tracking systems?). |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 541 Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...
|
Posted: Fri Jan 27, 2006 3:19 pm Post subject: |
|
|
...does it not work to have it stay & not redirect?
| Titan wrote: | | The go. subdomain is quite pointless... |
...when did you decide to add it?
| JSLover wrote: | | Can you do user/users/host? |
...as alternate subdomains (that stay, like file.*).
In the file manager I can't make it allow listing of a dir's contents...but the Read permission is set on the dir (for "public" {or "other" in unix speak}), so it should work...it's just disabled somewhere else...can you allow it when Read perm is on for a dir (& perhaps default "public" Read perm off for a dir). If you don't know how...adding Options +Indexes to the .htaccess should work.
Can you hack the Open URL link in the FM to the short url?
Can you force redirect all long urls to the short url?...lots of people still link to the long & they are ugly...plus it don't beak anything.
I can't create a blah.zip file & a blah.zip dir...but I'm almost sure unix allows this...I think it's a limitation (or a setting) of the FM...
I clicked on your short url when it was a redirect to your long url...now it's not, but my browser (NS7.2) still automatically goes to the long url (cuz it remembers redirects {only 301?} & skips requesting the server) (even tho when testing in IE it don't) & going to my url don't redirect to the long url...even in NS...but I never accessed it while it was redirecting to get it in NS's memory...now, my question...do you know of a way to clear NS's memory of 301 redirects? I've closed & re-opened it several times since then & thought that would make it forget, but it hasn't. _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Fri Jan 27, 2006 5:58 pm Post subject: |
|
|
| JSLover wrote: |
...does it not work to have it stay & not redirect? |
file.autohotkey.net is configured to /public_html/file/users/Members/, since the file manager is two directories up, it won't work like that.
| JSLover wrote: | | ...when did you decide to add it? |
Like I mentioned earlier, I decided to add it because I might want to expand it's uses in the future. For example, it could provide a download hit counter with basic analytics for owners (whilst hidden to downloaders)
| JSLover wrote: | | ...as alternate subdomains (that stay, like file.*). |
Would you need it? I'd like to keep everything uniformed and simple (i.e. only file. is used) but if you see it as an advantage to have, I'll add it.
| JSLover wrote: | | In the file manager I can't make it allow listing of a dir's contents |
I use Option -Indexes so that all the directories/files are not publicly viewable. This allows users to keep their files secret/hidden if they wish.
| JSLover wrote: | | Can you hack the Open URL link in the FM to the short url? |
Thanks, I've just made this change. I will change a few other things like the owner/group too.
| JSLover wrote: | | Can you force redirect all long urls to the short url?...lots of people still link to the long & they are ugly...plus it don't beak anything. |
I'm not sure this will be quite necessary (i.e. some people may perfer not to use subdomains or they may need www). |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 541 Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...
|
Posted: Fri Feb 03, 2006 5:19 am Post subject: |
|
|
| Titan wrote: | | file.autohotkey.net is configured to /public_html/file/users/Members/, since the file manager is two directories up, it won't work like that. |
...my last .htaccess example above (which was based on file.* = /public_html/file)...at least in theory, was supposed to not rewrite...1) root dir requests...2) any root .php file requests...3) urls starting with /users or /images. Could you try making file.* = /public_html/file & using some variation of my above .htaccess...or (if you leave file.* pointing where it is) try to rewrite those above conditions to ../../ (2 dirs up). Before file.* was redirecting to autohotkey.net/file, now it's going to autohotkey.net/index.html...which is nearly useless, cuz you have to click file to login (& if I want index.html on autohotkey.net I would type autohotkey.net, not file.autohotkey.net).
| Titan wrote: | | Would you need it? I'd like to keep everything uniformed and simple (i.e. only file. is used) but if you see it as an advantage to have, I'll add it. |
...um...need?...yes!...jk...really I just thought host.autohotkey.net/username would look good, seeing as how it hosts html files as well as zips...so it's more than just "file"...it's "host" or "user" or "users" .autohotkey.net.
file.autohotkey.net (just file{s}?)
host.autohotkey.net (autohotkey the host)
user.autohotkey.net (a user of autohotkey)
users.autohotkey.net (users of autohotkey)
| Titan wrote: | | I use Option -Indexes so that all the directories/files are not publicly viewable. This allows users to keep their files secret/hidden if they wish. |
...but...1) I can't add an .htaccess to override that if I want to list a dir...2) there's no "allow listing of this dir" checkbox in the file manager. If the file manager allows you to set the default permissions on new directories, you can remove public read & get the same result as Option -Indexes...with one difference...I can check public read (after I create the dir) & make it list the directory contents.
| Titan wrote: | | I'm not sure this will be quite necessary (i.e. some people may perfer not to use subdomains or they may need www). |
...1) www is a subdomain too, but most people don't know that...2) I don't think I've ever "needed" www on a url...I actually prefer all urls not have it.
I just noticed file.* has no favicon, like autohotkey.net does. _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Fri Feb 03, 2006 4:30 pm Post subject: |
|
|
| JSLover wrote: | | I just thought host.autohotkey.net/username would look good, seeing as how it hosts html files as well as zips | I used the subdomain file becuase the files (i.e. html/zip/ahk) are hosted through the 'File Manager'. Although I do agree that the url file.autohotkey.net seems pretty ambiguous when you're viewing html pages but I would not like to change it now that I've already implimented it. That is unless ofcourse I get a demand from users who prefer 'host' or otherwise instead.
I have also decided to use one subdomain rather than several purely for the fact that it keeps things uniformed and easier to manage.
| JSLover wrote: | | 1) I can't add an .htaccess to override that if I want to list a dir...2) there's no "allow listing of this dir" checkbox in the file manager. If the file manager allows you to set the default permissions on new directories, you can remove public read & get the same result as Option -Indexes...with one difference...I can check public read (after I create the dir) & make it list the directory contents. |
In answer to your questions:
1. Yes you can; the top directory of (file.)autohotkey.net is set to -Indexes for the reason I gave though
2. Well you know you can do it anyway I made the default '-Indexes'
The file (or folder) permissions on the file manager are CHMOD, like file properties. Don't get confused with .htaccess and CHMOD.
| JSLover wrote: | | 1) www is a subdomain too, but most people don't know that...2) I don't think I've ever "needed" www on a url...I actually prefer all urls not have it. |
Yes I know www is a subdomain
I don't want to force a redirect because the server would have to tell the client that the file doesn't exist in that location, which is false.
| JSLover wrote: | | I just noticed file.* has no favicon, like autohotkey.net does. |
Oh yes it does  _________________
 |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 541 Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...
|
Posted: Sat Feb 04, 2006 6:19 am Post subject: |
|
|
| Titan wrote: | | ...I would not like to change it now that I've already implimented it. |
...no one but me & you (& now toralf) know about it yet...quick! change it before people see!...
| Titan wrote: | | That is unless ofcourse I get a demand from users who prefer 'host' or otherwise instead. |
...I demand it!...there does that help? (jk)
| JSLover wrote: | | Before file.* was redirecting to autohotkey.net/file, now it's going to autohotkey.net/index.html... |
...this is still true.
| Titan wrote: | | 1. Yes you can |
...it says I can't create .htaccess.
| Titan wrote: | | 2. Well you know you can do it anyway |
...see 1.
| Titan wrote: | | The file (or folder) permissions on the file manager are CHMOD, like file properties. Don't get confused with .htaccess and CHMOD. |
...I know...Options -Indexes is a setting in .htaccess to globally disable listing a dir's contents (for a directory tree), but removing "other read" (as in ugo in chmod, user group other) (other = public checkbox in FM) works too (but only for one dir {if all dirs default to it tho, it works by default for all dirs}). Try this...create a test dir somewhere...add Options +Indexes to its .htaccess...view the dir in a browser, see empty dir list...type "chmod o-r test" (or "chmod o-r ." if executed inside the test dir), revisit the dir in a browser, see error page as if Options -Indexes were on...that's what I mean...if you can tell the file manager what permissions (chmod) to create new dirs with & remove other read permission...it will have the same effect as Options -Indexes, but be overrideable...BUT!...if I can use .htaccess in some way...that's fine (better) too, but HOW (see 1)?
| Titan wrote: | Oh yes it does  |
...lol...hrm...it didn't tho... _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Sat Feb 04, 2006 2:17 pm Post subject: |
|
|
| JSLover wrote: | | Titan wrote: | | ...I would not like to change it now that I've already implimented it. |
...no one but me & you (& now toralf) know about it yet...quick! change it before people see!... |
There around a hundred users and the site is already getting page impressions in six figure digits. This is partly why I'm so reluctant to change the urls again. You could start a poll (an unbiased one ) and I'll take action according to the results.
| JSLover wrote: | | ...I demand it!...there does that help? (jk) |
Goto, % (A_ThisQuoteReply-1)
| JSLover wrote: | | ...it says I can't create .htaccess. |
Hmm I didn't notice this. I guess this is the default decision by the file manager, I will allow the use of .htacess and .htpasswd soon.
I did
| JSLover wrote: | | Before file.* was redirecting to autohotkey.net/file, now it's going to autohotkey.net/index.html... |
I will contact the server company about that...
| JSLover wrote: | | ...lol...hrm...it didn't tho... [favicon for file.autohotkey.net] |
I put the favicon there right from the beginning. It was probabily your browser cashe or something.
I will continue to update autohotkey.net for the benefit of its users. Thank you for contributing with development. _________________
 |
|
| Back to top |
|
 |
|