Jump to content

johnnyk

Members
  • Posts

    126
  • Joined

  • Last visited

About johnnyk

  • Birthday 01/01/1950

Profile Information

  • Gender
    Not Telling

johnnyk's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  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).
×
×
  • 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.