RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
404 page

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    SibSoft Ltd Forum Index -> XFileSharing Pro
View previous topic :: View next topic  
Author Message
hdshare



Joined: 14 Nov 2010
Posts: 7

PostPosted: Nov 19, 2010 3:00 pm    Post subject: 404 page Reply with quote

Haw can I add 404.html page?

I know that there is a 404 page, but most of websites owners where I post my links do not allow my site because there is no 404.html in url.

This is exactly what I mean: http://........com/404.html

I have contacted support regarding this matter, but wouldn't reply.


Last edited by hdshare on Nov 19, 2010 5:44 pm; edited 2 times in total
Back to top
View user's profile Send private message
komi



Joined: 27 Nov 2009
Posts: 159

PostPosted: Nov 19, 2010 3:07 pm    Post subject: Reply with quote

The last version of XFS contains a default 404 page. No matter what you type, if the URL doesn't exist, it will return the 404 page.

It also seems to work correctly on your site, so not sure what you mean here.
Back to top
View user's profile Send private message
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 19, 2010 3:52 pm    Post subject: Reply with quote

use this code if you want to rewrite the 404 error to a file (browser side) instead the 404 page (server side)

Code:

RewriteEngine On
Options +FollowSymlinks

RewriteBase /

RewriteCond %{REQUEST_URI} !-d
RewriteCond %{REQUEST_URI} !-f
RewriteRule ^(.*)$ /404.php [L]


add the code to your htacces file

Code:

RewriteCond %{REQUEST_URI} !-d

if the requested url is not a directory , rewrite
Code:

RewriteCond %{REQUEST_URI} !-f

if the requested url is not a file , rewrite
Code:

RewriteRule ^(.*)$ /404.php [L]

where to rewrite it to ??

hopely this can help you

Greetings From PowerChaos
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
hdshare



Joined: 14 Nov 2010
Posts: 7

PostPosted: Nov 19, 2010 6:57 pm    Post subject: Reply with quote

Thanks mate, but your code doesn't work at all. I don't know, maybe I'm doing something wrong, but when I use your code the whole site goes down. Sad
Back to top
View user's profile Send private message
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 20, 2010 1:21 am    Post subject: Reply with quote

seems that the 404 get generated with api.cgi

make backups before starting to edit this file (can go badly wrong :S)

open that file (api.cgi) and search for
Code:

$conf=~s/ErrorDocument 404 .+/"ErrorDocument 404 $cc->{site_url}\/404.html"/e;


and you will see this code below to
Code:

print FILE qq[RewriteEngine on\nRewriteCond %{REMOTE_ADDR} !^$ip\nRewriteRule ^.*\$ "$c->{site_url}/404.html?$c->{site_url}/$f->{file_code1}/$file_name.html"];


i am not sure what to put in there , but those 2 are generating your htacces file + error 404 redirection

if you can alter it a bit and make it go to your url instead , then that would solve your problem , but i wont suggest to start messing with it if you are not sure ( or spend some time with it to learn it )

i am not able to help you with that as i know nothing of cgi (i just mess around and learn with messing around .. best way to learn Very Happy )

but like komi says , the 404 page is just located on root
in my case is it located here
http://boosterking.com/404.html

hopely this could help you a lot more ??

the other thing you can try (make backup , can do GREAT damage) is to remove that 404 error line and put the code of me in it
so you wont have a dublicated lines (those 404 that get written in it )

anyway , hopely this can help you to find your solution

Greetings From PowerChaos
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
hdshare



Joined: 14 Nov 2010
Posts: 7

PostPosted: Nov 24, 2010 10:27 pm    Post subject: Reply with quote

I'm not going to mess with coding while I'm nt sure what I'm doing, that's why I contanceted support regarding this matter but they wouldn't reply.

Support here is very unprofessional. Getting all that money for script and all the mods you could meka a bit more professional approach to you customers. Sad
Back to top
View user's profile Send private message
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 24, 2010 10:58 pm    Post subject: Reply with quote

it takes sometimes long to get a reply

but if they reply then you got mostly a solution

sometimes they are fast , other times they are slow , depends on what problem you have

to provide a example

if you got a small error or need a edit solution then they can be slow
but if you got a script that is refusing to work (like torrent mod) then they are not that slow

so it depends what priority it have and for what reason (from own experiance)

to get back ontopic

i would do the same , the other thing you can do (will give a 404 page Very Happy) is fixing the headers and put a 404 not found header in it

on that way it will show you a 404 page with headers instead a normal other webpage

maybe you can get it working on that way instead messing with the script to get it redirected to a differend kind of 404 page when it is basicly the same

Greetings From PowerChaos
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
hdshare



Joined: 14 Nov 2010
Posts: 7

PostPosted: Nov 25, 2010 5:41 pm    Post subject: Reply with quote

I can understan that sometime it can take sometime to reply on the forums, but there is no excuse for not replying on support tickets. That's unprofessional.

To get back on topic Wink

I don't quite understand what you mean by "fixing the headers". How can I fix the headers and put 404 not found?

I case you didn't get what I want, I'll give an axample.

Loombo is one of the bigest sites on the net using the same script, and they had the same problem, most of the site owners where users post links do not allow sharing sites without 404.html page, this is what I mean: http://www.loombo.com/no_file.html

So, can the admin reply to this post, because he's already been dealing with it many times, and he's aware of how importand this is to every user of this script.
Back to top
View user's profile Send private message
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 25, 2010 5:56 pm    Post subject: Reply with quote

well , thats a easy solution

you mean like this error page

http://powerchaos.com/showmetheerror

it is realy easy to do that

go to 404.html , open that file

just past your template in it (vieuw source code of your index script)

and you got yourself a build in template


only in your case , put it in no_file.html (cgi folder , template)

then it will remove that link that says , file not found , return back to main page

it is basic html and has nothing to do with htacces
and it is not a 404 error , as it is a simple html page

404 means file not found , but 404 does not reffer back to a file , it get server side loaded

the file not found means that it can not be found back in the database , it is sended by the script to that location and has nothing to do with a 404 error (it is just a file not found page , not a 404 page)

hard to explain , to explain it easy

you want to have a template around the file not found (after invalid DOWNLOAD link) page
or
you want to have a custom 404 error page ? ( non existing url )

so far i saw the example , just copy the source of your template (right click .. ) and put it in there, and change the middle part to File Not Found (and keep 404 error as tittle)

hopely this can help you ??

Greetings From PowerChaos
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
vb24



Joined: 25 Nov 2010
Posts: 15

PostPosted: Jan 15, 2011 5:49 pm    Post subject: Reply with quote

Hi,

i am having the same problem is there an update on this situation


Code:
http://www.vidxden.com/dsewdfdc6uwxv it leads to this one http://www.vidxden.com/404.html,

not an error on the same page like it is now.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 22 Mar 2006
Posts: 1281

PostPosted: Jan 15, 2011 6:14 pm    Post subject: Reply with quote

PowerChaos gave great explanation (see his last reply).
And, please, in future, do no bump old threads.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    SibSoft Ltd Forum Index -> XFileSharing Pro All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group