Omnimaga
General Discussion => Technology and Development => Web Programming and Design => Topic started by: Munchor on August 15, 2011, 04:15:44 pm
-
Does any of you know any guide on how to design programs that run well on mobile browsers? Thanks.
I'd also like to know how this kind of URL's work:
http://www.omgubuntu.co.uk/about/ (http://www.omgubuntu.co.uk/about/)
The page has to have a file name, like about.php or about.html, so how do they hide the file name?
I thought that maybe they use Javascript to change the URL in the window, is that how they do it?
Thanks.
-
Programs or webpages?
Either way, I'd be interested to know also.
It's probably a server-side thing -- you can configure servers so that file extensions are stripped off, or something.
(You can also place a 'index.html' file inside of a folder with the name you want, and typing in the url of that folder will redirect to the index file, but it doesn't feel like the prettiest solution to me.)
Edit: Hmm -- I have 888 posts... Now, if only I had 88 respect...
-
Edit: Hmm -- I have 888 posts... Now, if only I had 88 respect...
I can help with that >:DDoes any of you know any guide on how to design programs that run well on mobile browsers? Thanks.
http://www.webpagefx.com/design-build-mobile-web-site.htmlI'd also like to know how this kind of URL's work:
http://www.omgubuntu.co.uk/about/ (http://www.omgubuntu.co.uk/about/)
The page has to have a file name, like about.php or about.html, so how do they hide the file name?
I thought that maybe they use Javascript to change the URL in the window, is that how they do it?
Just name the file one of index.php, index.html, or index.htm and it'll show up as the default page for that directory.
-
You can also modify what page you want to use, IIRC.
-
I thought that maybe they use Javascript to change the URL in the window, is that how they do it?
No, i think they modify this with a .htaccess file.
-
By default index.php, index.html, index.htm, default.php, default.html, and default.htm should be recognized as index. (If you're hosted on Juju's server, all of these work. No need to modify .htaccess.)
-
Use javascript or php to automatically choose the css for the screen size.
OR
Use a liquid layout.
OR
Make another page with a javascript redirect that redirects if sceen size is smaller than x.
-
No, i think they modify this with a .htaccess file.
This is correct, Apache web servers have a mod named MOD_REWRITE ( http://httpd.apache.org/docs/2.0/misc/rewriteguide.html )
This allows urls such as http://www.example.com/page (without page being a folder)
or even: http://www.example.com/id/15/page/home/, which is then converted by apache to
<?php
$_GET = Array(
"id" => 15,
"page" => "home"
);
?>
And as far as I know apache is the only server supporting this.
Unless you also count self-written servers in.
For example, I have written my own webserver for use in a game I'm currently developing, which uses:
http://localhost/JavaScript and http://localhost/CSS
<script src="JavaScript" type="text/javascript"></script> ftw
-
ephan was asking about displaying a page as a folder, and you can do that by naming it index.html, without modifying .htaccess. You can use .htaccess, of course, but remember every line you add slows down every request to your site a bit.
-
ephan was asking about displaying a page as a folder, and you can do that by naming it index.html, without modifying .htaccess. You can use .htaccess, of course, but remember every line you add slows down every request to your site a bit.
By making a folder containing index.html/php/htm you can, yeah, but it's ugly.
And .htaccess doesn't slow down the site that much. (1ms on an average webhost, max)
Because .htaccess is cached by apache.