Hi,
I am having a problem on my server.I am receiving an error which is stating that file not found /xxx/xxx/xxx/public_html/wap.dat. I want to handle this problem through .htaccess. Is there any method of redirecting this path in general so that I can redirect all the errors like this with redirect.
Thanks in advance

happygeek commented: please post in appropriate forums for your questions -3

Recommended Answers

All 4 Replies

There is but we would need some more details on what you exactly want to happen.

What are the type of file paths you want redirecting and where do you want them to go to?

I want to create a script so that any error of this kind stating file not found to be removed for example file not found /home/test/public_html/wap.dat

Still need more info.

Your first example:

/xxx/xxx/xxx/public_html/wap.dat

then your second:

/home/test/public_html/wap.dat

The xxx implies you want to map any folder names as long as the path ends in /public_html/wap.dat

The second example has a different number of folders thus implying the depth of folders is not important.

I still have no idea where you actually want to redirect these pages to?

Maybe explaining in more details what you are trying to solve. what is wrong with something access a file that does not exist getting a "File Not Found" error?

I am trying to say that I dont care with the directory structure.I only want to remove the error of file not found and obviously the file not found error will come with public_html file the path before public_html is constant.It means that there are three folders befor public_html and they are constant but the file name after public_html is not constant so I need a script that will not allow this error rather redirect it to a 404 page

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.