Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

default background for image

Posted on 2009-12-25
10
Medium Priority
?
195 Views
Last Modified: 2013-07-31
hi am using cpanel
i need to tweak my site
if anyone opens a text file on my host
http://www.abc.com/a.txt
then it must load a background image by default
0
Comment
Question by:blaaze
9 Comments
 
LVL 61

Expert Comment

by:HainKurt
ID: 26122027
I could not get what you are trying to do... need more explanation...

0
 
LVL 4

Author Comment

by:blaaze
ID: 26122064
see we have files on our host, all our files are .txt files only

when ever user tries to open a text file, it should open text file and it should also display a background image behind the text, and note the url should not be changed, it should be as same as a text file's url
0
 
LVL 61

Expert Comment

by:HainKurt
ID: 26122098
what I am thinking is this...

user clicks a.txt
on server it cannot find it, and page is transferred to your custom error page say txt.asp (url stays as a.txt)
thir txt.asp does this

<html>
<head>a.txt</head>
<body background="someimage.jpg">
<pre>
<%= getFile(fname) %>
</pre>
</body>
</html>

where fname will be a.txt (you can get it from request url) and getFile is a function which reads a.txt from your server and returns content...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Author Comment

by:blaaze
ID: 26122100
can you give the working code if possible
and try to give in php if possible
0
 
LVL 61

Expert Comment

by:HainKurt
ID: 26122112
I am not expert on PHP / Apache...

you need to set your web server to handle txt file and redirect to a txt.php page
you need a function getFile(fName) to read fname file and return the content
you need another function to extract a.txt from current request url, www.domain.com/a.txt (this part is easy)

after these pieces put together you will have what you want...
0
 
LVL 4

Author Comment

by:blaaze
ID: 26122241
anyone else want to help in php can help me now, its very urgent
0
 
LVL 12

Accepted Solution

by:
Dean OBrien earned 2000 total points
ID: 26124606
If the user enters http://yourhost/yourfile.txt into the browser it will either open it in the browser or it will open it with the software which is associated to it on the local computer.

I may be mistaken, but the only way to access redirect and /or php script, is for the user to enter a url with that file extentsion, thus telling server how to process the script.

I dont think its possible given the constraints you have said.

Easynow
0
 
LVL 4

Author Comment

by:blaaze
ID: 26125816
the server must be configured to open the text file with an image
0
 
LVL 58

Expert Comment

by:Gary
ID: 39369483
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question