Re: [WSG] making beautiful uri's

2005-04-20 Thread John Horner
I came up with a very hacky solution for this kind of thing, for a 
server where I didn't have access to mod_rewrite or whatever.

Instead of
   website.com/cgi-bin/script.cgi?id=1
   website.com/cgi-bin/script.cgi?id=2
   website.com/cgi-bin/script.cgi?id=3
I created
   website.com/1/
   website.com/2/
   website.com/3/
where the /1/ folder contained "index.shtml" and "index.shtml" contained
  
and so on.
It's not a great solution for a site that needs updating all the 
time, but as a quick-and-dirty solution it worked very well.

One side effect of this that nobody's mentioned of course is that 
search engines don't know it's a dynamically-generated page and are 
therefore more likely to index it.

   "Have You Validated Your Code?"
John Horner(+612 / 02) 9333 3488
Senior Developer, ABC Online  http://www.abc.net.au/

**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
**


Re: [WSG] making beautiful uri's

2005-04-20 Thread Jan Brasna
Beware of the catch that with ForceType Apache accepts only GET requests 
and drops all POST data.

--
Jan Brasna aka JohnyB :: www.alphanumeric.cz | www.janbrasna.com
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
**


Re: [WSG] making beautiful uri's

2005-04-20 Thread Anthony Yeung
If you're using an Apache Server, you can do this via a .htaccess file

Here's how you code it:


    ForceType application/x-httpd-php


Replace "page1" with the file name of your choice. Save page1 with all
your PHP coding as a file with *no* file name extensions, as Apache
will automatically add the PHP extension once your add in the
"ForceType" function.

- AnthonyOn 4/20/05, Chris Stratford <[EMAIL PROTECTED]> wrote:
Simply make this file in your root directory:.htaccessinside that include:ReWriteEngine OnThen for every new link you want, add this:ReWriteRule ^linktofile.html$ phpfile.php
That will point http://www.yoursite.com/linktofile.html -> phpfile.phpYou can use REGEX in this, eg:ReWriteRule ^linktofile_([0-9]+).html$ phpfile.php
?id=$1That will link:http://www.yoursite.com/linktofile_55.html -> phpfile.php?id=55etc...For more info, reply to me offlist :)
Mr Bean wrote:>I'm still used to most of this web stuff and have>spent most of my time with the design part of web>design.  But the fact that I have to use a '.php'>after in almost all my urls on my site really bugs me.
>>Can anybody point me to a reference that can tell me>how to config it so that 'http://abc.def/hij' can>point to 'http://abc.def/hij.php
'?  I'm using a 1.3.x>Appache server.>>I would be really greatful if I could also learn how>to rewrite 'http://abc.def/hij/klm/nop' as>'
http://abc.def/hij.php?klm=nop' but maby that's>asking too much.>>__>Post your free ad now! 
http://personals.yahoo.ca>**>The discussion list for  http://webstandardsgroup.org/>> See 
http://webstandardsgroup.org/mail/guidelines.cfm> for some hints on posting to the list & getting help>**>
>--Chris Stratford[EMAIL PROTECTED]http://www.neester.com
**The discussion list for  http://webstandardsgroup.org/ See 
http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help**

Re: [WSG] making beautiful uri's

2005-04-20 Thread Chris Stratford
Simply make this file in your root directory:
.htaccess
inside that include:
ReWriteEngine On
Then for every new link you want, add this:
ReWriteRule ^linktofile.html$ phpfile.php
That will point http://www.yoursite.com/linktofile.html -> phpfile.php
You can use REGEX in this, eg:
ReWriteRule ^linktofile_([0-9]+).html$ phpfile.php?id=$1
That will link:
http://www.yoursite.com/linktofile_55.html -> phpfile.php?id=55
etc...
For more info, reply to me offlist :)
Mr Bean wrote:
I'm still used to most of this web stuff and have
spent most of my time with the design part of web
design.  But the fact that I have to use a '.php'
after in almost all my urls on my site really bugs me.
Can anybody point me to a reference that can tell me
how to config it so that 'http://abc.def/hij' can
point to 'http://abc.def/hij.php'?  I'm using a 1.3.x
Appache server.
I would be really greatful if I could also learn how
to rewrite 'http://abc.def/hij/klm/nop' as
'http://abc.def/hij.php?klm=nop' but maby that's
asking too much.
__ 
Post your free ad now! http://personals.yahoo.ca
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
**

 


--

Chris Stratford
[EMAIL PROTECTED]
http://www.neester.com

**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
**


RE: [WSG] making beautiful uri's

2005-04-20 Thread Patrick Lauke
> Mr Bean

> Can anybody point me to a reference that can tell me
> how to config it so that 'http://abc.def/hij' can
> point to 'http://abc.def/hij.php'?  I'm using a 1.3.x
> Appache server.

There are many ways, but the simplest: add multiviews
option (either in httpd.conf or via an .htaccess file)

Options +MultiViews

Patrick

Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
**



Re: [WSG] making beautiful uri's

2005-04-20 Thread Jan Brasna

--
Jan Brasna aka JohnyB :: www.alphanumeric.cz | www.janbrasna.com
**
The discussion list for  http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
**


Re: [WSG] making beautiful uri's

2005-04-20 Thread Hopkins Programming
You could use Apache's Content Negotiation.
http://httpd.apache.org/docs/content-negotiation.html

I'm not sure about the passed parameters though.

--Zachary

On 4/20/05, Mr Bean <[EMAIL PROTECTED]> wrote:
I'm still used to most of this web stuff and havespent most of my time with the design part of webdesign.  But the fact that I have to use a '.php'after in almost all my urls on my site really bugs me.
Can anybody point me to a reference that can tell mehow to config it so that 'http://abc.def/hij' canpoint to 'http://abc.def/hij.php'?  I'm using a 
1.3.xAppache server.I would be really greatful if I could also learn howto rewrite 'http://abc.def/hij/klm/nop' as'http://abc.def/hij.php?klm=nop
' but maby that'sasking too much.__Post your free ad now! http://personals.yahoo.ca**
The discussion list for  http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help**-- ==
"The best way to predict the future is to invent it."  [EMAIL PROTECTED] http://www.hopkinsprogramming.net



[WSG] making beautiful uri's

2005-04-20 Thread Mr Bean
I'm still used to most of this web stuff and have
spent most of my time with the design part of web
design.  But the fact that I have to use a '.php'
after in almost all my urls on my site really bugs me.

Can anybody point me to a reference that can tell me
how to config it so that 'http://abc.def/hij' can
point to 'http://abc.def/hij.php'?  I'm using a 1.3.x
Appache server.

I would be really greatful if I could also learn how
to rewrite 'http://abc.def/hij/klm/nop' as
'http://abc.def/hij.php?klm=nop' but maby that's
asking too much.

__ 
Post your free ad now! http://personals.yahoo.ca
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
**