U.S. CitiesCity-Data Forum Index
Go Back   City-Data Forum > General Forums > Science and Technology > Computers
 [Register]
Please register to participate in our discussions with 1.5 million other members - it's free and quick! Some forums can only be seen by registered members. After you create your account, you'll be able to customize options and access all our 15,000 new posts/day with fewer ads.
Jump to a detailed profile or search
site with Google Custom Search

Search Forums  (Advanced)
Business Search - 14 Million verified businesses
Search for:  near: 
 
 
Old 08-05-2009, 02:18 PM
 
Location: ɐpɐʌǝu 'sɐƃǝʌ sɐl
14,439 posts, read 10,315,185 times
Reputation: 7271

Advertisements

Yeah, logo.jpg is the name of the image file. The "alt" attribute is technically required, per the HTML specification, but none of the browsers will complain if it's not there. It's good to have for search engine placement, though, but there's no need for you to worry about that right now...
Quick reply to this message

 
Old 08-05-2009, 02:51 PM
 
125 posts, read 440,931 times
Reputation: 84
Quote:
Originally Posted by swagger View Post
Yeah, logo.jpg is the name of the image file. The "alt" attribute is technically required, per the HTML specification, but none of the browsers will complain if it's not there. It's good to have for search engine placement, though, but there's no need for you to worry about that right now...
I don't know what I'm doing wrong. Anywhere I place that code, it just displaces an image slice and shows some strange logo. I can't get the image slice I want to actually become the link. Grrrrr....
Quick reply to this message
 
Old 08-05-2009, 03:17 PM
 
Location: ɐpɐʌǝu 'sɐƃǝʌ sɐl
14,439 posts, read 10,315,185 times
Reputation: 7271
The problem you're having now is with layout, not function. It's hard to visualize what you're seeing, much less how to fix it. DM me the link to your site and I can probably figure it out. (you caught me in the right mood today )
Quick reply to this message
 
Old 08-06-2009, 06:03 AM
 
23,316 posts, read 17,677,944 times
Reputation: 7654
If you have an apache server open notepad and add the following lines and save it as whatever:

Quote:
<Files *.pdf>
ForceType application/octet-stream
Header set Content-Disposition attachment
</Files>
Create a new folder on your server for your pdf's *, upload the file you just created to the new folder then rename it:

Quote:
.htaccess
Note the period placement and the file does not have a name. This is server file to which you can add directives. What you're doing here is changing the mime type so the header that is sent to the browser is not a .pdf which will prevent the default action (usually the pdf openeing in a browser window). Instead the user should get prompt for what they want to do with the file, (save, open with, etc. )

* you could just upload this to the root of your domain but if you do that every .pdf will be effected by this. By placing it in lower directory it will only effect files in that directory or below it.

Also note many hosts limit or do not allow htaccess files so you may not be able to use this or contact them about adding it.
Quick reply to this message
 
Old 08-06-2009, 09:50 AM
 
Location: ɐpɐʌǝu 'sɐƃǝʌ sɐl
14,439 posts, read 10,315,185 times
Reputation: 7271
Quote:
Originally Posted by thecoalman View Post
If you have an apache server open notepad and add the following lines and save it as whatever:

Create a new folder on your server for your pdf's *, upload the file you just created to the new folder then rename it:

Note the period placement and the file does not have a name. This is server file to which you can add directives. What you're doing here is changing the mime type so the header that is sent to the browser is not a .pdf which will prevent the default action (usually the pdf openeing in a browser window). Instead the user should get prompt for what they want to do with the file, (save, open with, etc. )

* you could just upload this to the root of your domain but if you do that every .pdf will be effected by this. By placing it in lower directory it will only effect files in that directory or below it.

Also note many hosts limit or do not allow htaccess files so you may not be able to use this or contact them about adding it.
I hadn't even thought about doing it via apache - that's also a good solution.

OP - It does require apache, which is generally only offered on linux web servers. If your hosting account is on a Windows server, this probably won't work for you.
Quick reply to this message
 
Old 08-06-2009, 11:52 AM
 
125 posts, read 440,931 times
Reputation: 84
Quote:
Originally Posted by thecoalman View Post
If you have an apache server open notepad and add the following lines and save it as whatever:

Create a new folder on your server for your pdf's *, upload the file you just created to the new folder then rename it:

Note the period placement and the file does not have a name. This is server file to which you can add directives. What you're doing here is changing the mime type so the header that is sent to the browser is not a .pdf which will prevent the default action (usually the pdf openeing in a browser window). Instead the user should get prompt for what they want to do with the file, (save, open with, etc. )

* you could just upload this to the root of your domain but if you do that every .pdf will be effected by this. By placing it in lower directory it will only effect files in that directory or below it.

Also note many hosts limit or do not allow htaccess files so you may not be able to use this or contact them about adding it.
I just tried this. Now when I go to click on the pdf link, I just get an "HTTP 404 Not Found" page. I use host gator. Any ideas?
Quick reply to this message
 
Old 08-06-2009, 12:11 PM
 
125 posts, read 440,931 times
Reputation: 84
SUCCESS!!! The .htaccess file works like a charm!

The previous 404 message was because I hadn't changed the pdf link (after I made a new subfolder and placed the pdf in the subfolder on the cp).

Thank you thecoalman and swagger, I really appreciate all your help!
Quick reply to this message
 
Old 08-14-2014, 07:49 PM
 
1 posts, read 111 times
Reputation: 10
Thank you Swagger - that is a lovely snippet and exactly what I was looking for to get around firefox's pathetic new beta pdf viewer! You're the boss :-)
Quick reply to this message
Please register to post and access all features of our very popular forum. It is free and quick. Over $68,000 in prizes has already been given out to active posters on our forum. Additional giveaways are planned.

Detailed information about all U.S. cities, counties, and zip codes on our site: City-data.com.


 
Please update this thread with any new information or opinions. This open thread is still read by thousands of people, so we encourage all additional points of view.

Quick Reply
Message:
Over $84,000 in prizes was already given out to active posters on our forum and additional giveaways are planned!

Go Back   City-Data Forum > General Forums > Science and Technology > Computers
Similar Threads

All times are GMT -6.

2005-2014, Advameg, Inc.

City-Data.com - Archive 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 - Top