Jump to content

johnnyk

Members
  • Posts

    126
  • Joined

  • Last visited

Everything posted by johnnyk

  1. Hi all. I don't know much at all about .htaccess and would appreciate help with a simple .htaccess script. I have multisite Drupal set up. www.mysite.com points to ~/public_html. www.mysite.com/site2 also points to ~/public_html (via the symlink ~/public_html/site2). There is a ~/public_html/files directory. So www.mysite.com/files and www.mysite.com/site2/files point to the exact same directory. What I want to happen is this: If someone navigates to www.mysite.com/files/[filename], direct them to ~/public_html/files/[filename] If someone navigates to www.mysite.com/site2/files/[filename], direct them to ~/public_html/sites/www.mysite.com.site2/files/[filename] where [filename] is either a filename or something like path/to/filename Does anyone know how this could be accomplished, or know of a tutorial that might point me in the right direction? Thanks alot!
  2. I'm gonna start work on a website soon. It's gonna involve a good amount of people interacting with a DB (logging in, adding comments, voting, what not). I'm gonna write the site in PHP/MySQL. The only thing is that I've never made a website with this much DB interaction before and I'm worrying that it won't be secure. Does anyone have any suggested reading for someone who is an intermediate PHP/MySQL programmer but knows almost nothing about security?
  3. I'm not sure I understand. Doesn't "ExpiresActive On" enable it?
  4. I'm trying to set the expiration for an mp3 file. I put the following in the .htaccess of the root, but got a 500. [code]ExpiresActive On ExpiresDefault M432000[/code] What's the deal?
  5. johnnyk

    RGB

    Yeah but I want the red to be lighter to the exact same degree that 75,75,75 is lighter than 0,0,0. What do I set the g and b to to achieve that?
  6. johnnyk

    RGB

    This is really an RGB question, but there's no forum for that so I thought I'd post it here because CSS deals with RGB. This may not make sense... I want to find the color that is the same distance from 255,0,0 that 75,75,75 is from 0,0,0. A better way to phrase it might be "75,75,75 is x lighter than 0,0,0. What is x lighter than 255,0,0?". So obviously to get 75,75,75 from 0,0,0 you just add 75 to R,B,G. But you can't have 330,75,75. What would be the equivalent to that?
  7. Is there any difference between using: [code]div { css } div:hover { different css } <div>asdf</div>[/code] AND [code]div { css } div.different { different css } <div onmouseover="this.className='different'">asdf</div>[/code] The only differece I know of is that the first one doesn't work in IE6...but fuck IE6 it's a piece of shit (IE makes me angry). Besides that is there any difference?
  8. [quote author=ober link=topic=110909.msg449043#msg449043 date=1160351997] If blocking a browser was illegal in any such manner, half the web would be shut down. [/quote] I know that's not illegal, but encouraging others to and especially using the Microsoft name might be. And I dont wanna screw with Microsoft.
  9. I had this idea for a website, but right now I doubt I'll make it myself because I don't know if it would be legal or not and I don't feel like hiring a lawyer. I know, right now you probably think it's a website promoting crime or something but it's not. Anyone, go ahead and steal the idea from me and make the website if you feel like you know more about the law than I do, get legal advice, or just don't care. Just don't blame me if you get sued by Microsoft. I came up with the idea after I realized that of the time I spent designing, about 25% of that time was spent dumbing everything down for Internet Explorer. And even then IE still didn't get it all that near perfect. I realized that IE is just a pain and is holding the internet back. ---------- So the site would encourage webmasters to block any visitor from Internet Explorer. The website could post code that would block IE via several different languages (php, perl, js, apache, whatever). Any webmaster who's interested would just have to copy/paste the code to their site and that's it. The code could print the text "This website does not support Internet Explorer.<br />To view this website, you must download <a href="http://www.getfirefox.com">Firefox</a>." or anything like that. If you want to promote another browser, that's fine, as long as it isn't IE. To benefit the sites that use the code, you could have a list of participating sites. You could use a cron or whatever to check every so often that the site is still blocking IE. If it isn't, it's off the list. The only problem I see (besides the legality of encouraging people to block Microsoft's product), is getting webmasters to actually do it. I think for it to work, first a few small-medium sites that are willing to lose some traffic need to do it. After some time, people will get used to seeing the "IE is blocked" message, even if they don't actually download a different browser. Once people are used to having some of their lesser useful sites blocked, they won't be as surprised when a bigger site starts blocking IE. Once people start to download Firefox to avoid the block, even bigger sites won't be as afraid of blocking IE. Don't expect Google or anything remotely close to that to block IE just because you say so. Aim for the smaller sites and just see if it takes off. Don't expect that this is going to completely kill IE either. As long as there's Windows there'll be someone using IE. But if more people used an alternative, less time would have to be spent making sites IE-compatible. The only thing I have to back up by trust that this might work is that I know someone who just uninstalled Firefox only because a couple of game websites (optonline.net/games for one, but there were others I can't remember) blocked Firefox. They had been using Firefox for about a month or two and liked how it was faster and what not, but (even when I showed them how to use IE View), they told me they'd rather deal with IE's problems because it was easier. I'm letting you take this idea (if you even want to, which you might not) because it doesn't really matter who makes a site based around it. I don't care about making money off the site, I just want the internet to be a better place to design for, and IE (or IE6- at least. You could allow IE7 if you want to, I heard it's pretty decent) is preventing that from being possible. Even if the site is a complete failure and no one blocks IE, what do you have to lose? A few hours and >$100. The benefit outweighs the risk. Any thoughts would be appreciated.
  10. OK I'll try to make sense. I want any visitors from a certain host to see an image instead of the website. Is there a way to do that using only .htaccess?
  11. Isn't there a way to do it using something like: RewriteCond %{REMOTE_HOST} [i]whatever[/i] RewriteRule [i]whatever[/i]
  12. But I want the blocked domains to get a different 403 (or 404 or whatever it is) than everyone else.
  13. I don't know much about .htaccess and I never learned about mod_rewrite or whatever that fancy thing is. What I want to do is deny from a certain domain. Instead of a 403 page, I want anyone who is from that domain to see an image when they go to my site. Any idea how that would happen?
  14. For the paragraph that you want to be at the right of the div and right-justified, use this CSS: [code] p { text-align: right; margin-left: auto; } [/code] ...plus whatever CSS you already have for it. The above will make it work in Firefox (and pretty much all browsers except IE), to make sure it also works in IE, keep "text-align: right;" in the CSS of the p's container div. Just so you know, if something works in IE but not Firefox, it usually means that it only works in IE because of a flaw in IE. The above CSS is the correct way to do it, but IE only do what you want it to do if the container div has "text-align: right;" in it (which, in IE world, is the "correct" way to do it).
  15. New problem [code] #div { margin-left: 158px; padding: .5em; } [/code] In real browsers, once the text in the div reaches the right edge of the viewport it wraps, but in IE the div expands 158px to the right, the same size as the marign, and then wraps.
  16. How's IE7? I heard it's pretty good but I'm actually hoping it's terrible. It's gonna be at least a couple years before a majority of people are using it, so developers will still have to deal with IE6 for a while. If IE7 is bad, there will probably be more talk about Firefox.
  17. How will it turn out? Will Internet Explorer be a thing of the past in a couple years?
  18. This is only a problem because IE is evil. I want my div to have two borders. To do that, I do something like this: [code] #menu { width: 150px; height: 300px; position: absolute; top: 0; left: 0; border-right: 3px solid #999999; border-bottom: 3px solid #999999; border-left: 3px solid #999999; background-color: #000000; } #menuwrap { width: 156px; height: 303px; border-right: 1px solid #ff0000; border-bottom: 1px solid #ff0000; border-left: 1px solid #ff0000; } <div id="menuwrap">   <div id="menu">   </div> </div> [/code] Now that looks fine in Firefox and I'm sure it looks fine in every browser but IE. IE puts the border of #menu inside the element because IE is pure evil. So that messes the whole thing up. When viewed in IE, it looks like #menuwrap is 6 pixels too wide and 3 pixels too high (or about that, whatever, it looks too big). How can I make this thing look good in IE [b]and[/b] in real browsers? I don't wanna use the IE conditional thing because I have another problem related to this that it will not help with.
  19. johnnyk

    Div layout

    That's the second css layout tutorial I've seen that put Latin in the div. What's the deal with that?
  20. johnnyk

    Div layout

    I found that one, didn't help me too much cause they don't show what the html would look like. And what if I wanted there to be space to the left of list1 and the right of list2? Know of any other tutorials?
  21. johnnyk

    Div layout

    Does anyone know of a good tutorial that describes how to mimic table layouts with div?
  22. What's the best way to embed a sound into a webpage so that it will work with most browsers? Also has to be something that doesn't give the Firefox plugin error.
  23. Is it possible to assign one username two different passwords in .htaccess?
  24. Using 644, I can still view the .inc file (when it includes html) direct from browser. Also, can I prevent other sites from using my .incs with the .htaccess hotlinking thing?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.