[thelist] web page extensions
JJ
shhhh at silence.co.nz
Thu Jul 25 19:13:01 CDT 2002
It could be a case where the following happens:
http://example.com/catalog/newcar
"catalog" is actually a file (say PHP for example) which reads "newcar" in
as a value and displays the page based on that variable. It's a handy way to
end up with search engine friendly URLs, rather than say
http://example.com/catalog.php?page=newcar
It would use something along the lines of...
<Files catalog>
ForceType application/x-httpd-php
</Files>
in the .htaccess to force the file to PHP and then
<?
$var_array = explode("/",$PATH_INFO);
$page = $var_array[1];
?>
inside the file 'catalog' to set the variables based on what follows the '/'
:o)
Cheers,
JJ
First time poster, long time lurker
> On Thursday 25 July 2002 9:57 pm, Mark Joslyn wrote:
> > So companies that implement this system have a lot of files named
> > index.html or default.html (one for each directory)? That seems a little
> > confusing to keep naming files the same name.
>
> Yes, you do end up with quite a lot of index files. It's not confusing
> however; since you are clearly organising your files into a directory
> structure, there should be no confusion over different files because of
> their context - when you edit example.com/catalogue/index.html you aren't
> going to confuse it with example.com/support/index.html
More information about the thelist
mailing list