View Full Version : weird index.love??
seonub09
03-06-2007, 06:16 AM
[USER BANNED, MESSAGE REMOVED]
Moderator note: To keep this information available, the original post can be rephrased as asking how a page can have a custom extensinon, not .htm, etc.
tech_support
03-06-2007, 06:18 AM
Probably just a server configuration.
yeaaa oops i by askident delete ur comment geeze dis thing is confusin me .. eheh lol but yea i was wonderin how u change my url thingy. and i posted a bullentin on ymspace tlelin peepo to join dis site =D do i get ne credit for it =D lol(shudder) MySpace.
Yeah, servers can be configured to use any file extension. It doesn't matter.
jscheuer1
03-06-2007, 03:11 PM
Well, an easy way, assuming that the dot character is legal for use in directory names - I think it is, would be to make a directory called Index.love and have an index file in it. It could even be a (shudder) frameset.
mburt
03-06-2007, 03:31 PM
Look at php.net for example. All of their pages are some sort of extension.
Example:
http://ca.php.net/manual/en/ref.ftp
jscheuer1
03-06-2007, 04:02 PM
Look at php.net for example. All of their pages are some sort of extension.
Example:
http://ca.php.net/manual/en/ref.ftp
I wonder if that serves an organizing purpose for the site or is just 'showing off'. It could just as easily be ref_ftp.php unless using the custom extension really helps organize the site.
mburt
03-06-2007, 04:09 PM
Actually, it's because when an error is parsed with php it will display the error and have a link. The spaces in the title of the error are replaced with ".", so the link will go straight to the ref.
tech_support
03-07-2007, 05:33 AM
So.. how can Google get away without the file extensions?
eg. http://www.google.com.au/search?q=hello
thetestingsite
03-07-2007, 05:40 AM
.htaccess. I found a tutorial a while back on how to do this, but I had no real use for it and forgot what the url was.
I repeat, the request URI passed to the server needn't be the path to an actual file. It can be whatever the server wants it to be. For example, in Django, there's an urls.py file which contains a list of regexes and functions (all in one file, views.py) to associate with them. When the regex is matched in a request URI, the function is called with the regex's captures as arguments, and the result of the function is displayed to the browser.
jscheuer1
03-07-2007, 04:51 PM
I repeat, the request URI passed to the server needn't be the path to an actual file. It can be whatever the server wants it to be. For example, in Django, there's an urls.py file which contains a list of regexes and functions (all in one file, views.py) to associate with them. When the regex is matched in a request URI, the function is called with the regex's captures as arguments, and the result of the function is displayed to the browser.
Just out of curiosity then, under those circumstances, what is displayed in the address bar? Is it the user entered/link URI or the URI of the resource/page fetched?
No, you're looking it in completely the wrong way.
When a request is sent to the server, the URI line looks something like this:
GET /path/to/file.html HTTP/1.1That "/path/to/file.html" is just a string. It's entirely up to the webserver what to do with it. It may decide to use that to look for a file called file.php on the server's hard drive, or it may do something totally different; it might, for example, connect to a remote site and download some data from there, or run a script, or contact a device (a webcam or some such thing).
The browser's address bar shows the URL of the current location. Unless a redirect status code is returned, that doesn't change. The real data, though, can come from anywhere: there's no guarantee that the URL reflects the layout of the server's hard drive, or even that the webserver is reading from the hard drive at all.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.