• Web Development Questions That Don't Need Their Own Thread v2
    3,079 replies, posted
[QUOTE=r4nk_;30175885]What is the best way to go about this: I have a website hosted on one server, but I want all my images to be fetched from somewhere else. For example I want a web page to be able to have this inside example.com: [html]<img src="img/file.png" />[/html] But for the server to translate that image url to: someothersite.com/img/file.png I could just write the second site in full but then if I ever want to change it it's a hassle. I could do it easily with php but I was wondering if there is a nicer way, like maybe .htaccess files let you reroute all files inside /img/* to yourdomain.com/img/* [editline]1st June 2011[/editline] Hmmm... is it as simple as this in the .htaccess file? [code]RedirectMatch 301 img/(.*) othersite.com/img//$1[/code][/QUOTE] You need [url]http://,[/url] but otherwise it should work
[QUOTE=tngr;30175985]You need [url]http://,[/url] but otherwise it should work[/QUOTE] Thanks. Is this the best way to do it? Don't think I need to do this anyway, I thought the web hosting Elffie generously gave me seemed to be loading an image slowly but I realised it just wasn't an interlaced png (and I was using a larger image with the size set to much lower for the thumb) because it was the same when I was using a dropbox copy :v:
You could also use the <base> tag.
[QUOTE=20 Smartness;30174170][php]echo "fp is " . ($fp == "up" : "up" : "down");[/php] [editline]1st June 2011[/editline] Wait, what? [php]echo "fp is " . $fp;[/php][/QUOTE] Fixed the tenary, they use ? :, not : :. [php]echo "fp is " . ( $fp == "up" ? "up" : "down" );[/php] Also, one more block of code on this matter [php]if ($condition): // Many lines // of code endif;[/php]
I want the entire menu tabs to be clickable because right now, you are forced to click on the links. I did some reading and apparently you should put the padding on the <a> instead of the <li> - I tried that and it gives me this result: [img]http://m.yey.nu/93cba2.png[/img] when it's supposed to look like this: [img]http://m.yey.nu/ba079a.png[/img] Code: [url]http://pastebin.com/y2ypgWtv[/url]
you need to put the <li> inside of the <a>, like this: <ul> <a href="somepage><li>your text here</li></a> </ul>
[QUOTE=H4Z3Y;30178491]you need to put the <li> inside of the <a>, like this: <ul> <a href="somepage><li>your text here</li></a> </ul>[/QUOTE] Oh, wow, I can't believe it was that simple. I did some tweaking after putting the li inside the a and it works perfectlynow, thanks!
[img]http://f.braxupload.se/oy408j.jpg[/img] I'm getting really pissed at this, goes on forever. Ubuntu host with SFTP & FTP accounts set up for it, nothing works. Funny thing is, it works on my stationary.
[QUOTE=H4Z3Y;30178491]you need to put the <li> inside of the <a>, like this: <ul> <a href="somepage><li>your text here</li></a> </ul>[/QUOTE] I'm not sure that's valid actually. [editline]1st June 2011[/editline] Just use line-height John
What is a good VPS host? I don't need any significant power to speak of, bandwidth and disk space neither. Must offer EU locations. I have looked at hostrail, which is good, except their EU VPS is too expensive.
fanatical vps
[quote]Fanatical VPS servers are hosted in the 6,500 sq meter datacenter park in Nuremberg, Germany. [/quote] I say Germany is located on EU
[QUOTE=AntoniD;30129283]Why would you use tables for layout? Hard to style, not meant to be used that way, etc. Learn to use divs.[/QUOTE] Christ, I'm still a bad web designer and I managed to learn div structuring perfectly well in one day. It really isn't hard at all.
whoops misread
[QUOTE=TehWhale;30187434]fanatical vps [editline]1st June 2011[/editline] pretty sure they have eu locations [editline]1st June 2011[/editline] or...not[/QUOTE] Not bad, but I'd certainly be happy if their prices were <10 USD a month.
-snip-
[QUOTE=TehWhale;30188297]you probably won't get a good vps for less than $10/mo[/QUOTE] [url]https://hostrail.com/vps.php[/url] Seems good enough to me [editline]2nd June 2011[/editline] I'd be grateful if you want to explain why you disagree
[QUOTE=Within;30188273]Not bad, but I'd certainly be happy if their prices were <10 USD a month.[/QUOTE] I disagree to above: You'd seriously give that company your money when their website looks like shit? Sub-section of FanaticalVPS: [url]https://client.fanaticalvps.com/cart.php?gid=3[/url]
[QUOTE=Sc00by22;30188394]I disagree to above: You'd seriously give that company your money when their website looks like shit? Sub-section of FanaticalVPS: [url]https://client.fanaticalvps.com/cart.php?gid=3[/url][/QUOTE] I see they also have a "super micro" VPS. Too bad the disk space is horribly out of proportions with the bandwidth. I'd rather have less-than-unmetered bandwidth and more disk space.
[QUOTE=Within;30188464]I see they also have a "super micro" VPS. Too bad the disk space is horribly out of proportions with the bandwidth. I'd rather have less-than-unmetered bandwidth and more disk space.[/QUOTE] Download -> Install -> delete -> download -> install -> delete -> and so on.
Right now the "micro" solutions seems to be the best because of the disk space, but $10/month is a bit excessive for me.
These should cheer you up. I'm using them. Seem alright and the price is right. [url]https://www.qualityservers.co.uk/cp/cart.php?gid=31[/url]
[QUOTE=Within;30188667]Right now the "micro" solutions seems to be the best because of the disk space, but $10/month is a bit excessive for me.[/QUOTE] If you mean our Micro we can run custom VPS if you need less RAM/etc but more disk space, just get in touch :)
What would you guys say is the best program to use for web devlopment? Dreamweaver?
[QUOTE=Paulendy;30201998]What would you guys say is the best program to use for web devlopment? Dreamweaver?[/QUOTE] Personal Preference really. If you must use dreamweaver don't be using design mode. I recommend [url=http://www.sublimetext.com/]Sublime.[/url]
I think making websites with just a text editor is a bit over my head right now, but I'll give sublime a look.
[QUOTE=Paulendy;30202162]I think making websites with just a text editor is a bit over my head right now, but I'll give sublime a look.[/QUOTE] It is the best place to start, you learn so much more coding than what you would using design view in Dreamweaver.
I use Notepad++. Hey, it works.
I really want to ditch Dreamweaver now. Anyone know an alternative with: - FTP support that also has SFTP - Code formatting (makes it pretty) - Code coloring - Autocomplete including function names & parameters ( write </ and it autocompletes with </div> / </html> etc, and write subs and substr($); comes up etc) - Fully configurable
[QUOTE=Rashy;30202246]It is the best place to start, you learn so much more coding than what you would using design view in Dreamweaver.[/QUOTE] Well then could you recommend some good tutorials?
Sorry, you need to Log In to post a reply to this thread.