The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> php in urls
truculentknight
post Oct 6 2007, 09:07 PM
Post #1





Group: Members
Posts: 9
Joined: 10-September 07
Member No.: 3,765



hey everyone,

I know this may seem that a really dumb question but how do I get my url to look like www.example.com/index.php?ID=1 or something like that. I want the url of my site to look professional instead of looking like www.example.com/index.htm or /example/test.html

How can I change the url to use php just as this forum does? Thanks!

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 6 2007, 10:26 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



You can tag on a querystring to an URL to a HTML file. Nothing happens if there isn't script that can interpret the querystring, not more than that you possibly screw up caching.
http://htmlhelp.com/index.html?fakeit=!1337

But you shouldn't do that. You are wrong. There's nothing more professional with such URLs. On the contrary, people go to great length to avoid them.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 6 2007, 10:57 PM
Post #3


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE
On the contrary, people go to great length to avoid them.


They do? Why?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 6 2007, 11:18 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Maybe they don't think they look very professional. tongue.gif
http://google.com/search?q=user+friendly+urls
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 7 2007, 03:07 AM
Post #5


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(pandy @ Oct 7 2007, 01:18 PM) *

Maybe they don't think they look very professional. tongue.gif
http://google.com/search?q=user+friendly+urls


Well, there are some interesting ideas there about things like making urls transparent to the user. But this stuff about replacing

shop.com?product=E11053

with

shop.com/product/E11053

all seems a bit misguided to me. First, it is actually slightly _less_ transparent to the user, and secondly it means replacing HTML forms with troublesome Javascript ("AJAX" etc). Seems like a step backwards to me.

I came across an interesting comment recently where some people were discussing whether the jigsaw puzzles I sell might be imitation versions, because they were too cheap(!) - and someone said they thought my website http://imaginatorium.org/shop did not look as "professional" as (e.g.) http://www.hlj.com ... any idea what that would mean? (Apart from I should put the prices up!)

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
truculentknight
post Oct 8 2007, 02:49 AM
Post #6





Group: Members
Posts: 9
Joined: 10-September 07
Member No.: 3,765



hmm...

I always thought it looked more professional instead of /example/test.html or something like that. I will look into what you said and try to research it further. Thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Bumblebee
post Oct 29 2007, 08:04 PM
Post #7





Group: Members
Posts: 3
Joined: 29-October 07
Member No.: 4,180



I think he means the apache mod_rewrite function

look up mod_rewrite in google
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 29 2007, 08:44 PM
Post #8


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE(Brian Chandler @ Oct 7 2007, 01:07 AM) *
But this stuff about replacing

shop.com?product=E11053

with

shop.com/product/E11053

all seems a bit misguided to me. First, it is actually slightly _less_ transparent to the user, and secondly it means replacing HTML forms with troublesome Javascript ("AJAX" etc). Seems like a step backwards to me.
I suppose using the query string makes it more transparent that the server is generating pages, rather than delivering HTML files. But does this transparency really matter? To me, it seems a matter of style. Pick one, and go with it.

I don't understand the argument about JavaScript/AJAX at all. If the server-side program is designed to extract the necessary information from the URL's path rather than from the URL's query string, then why should any client-side technique be necessary?

QUOTE(Brian Chandler @ Oct 7 2007, 01:07 AM) *
I came across an interesting comment recently where some people were discussing whether the jigsaw puzzles I sell might be imitation versions, because they were too cheap(!) - and someone said they thought my website http://imaginatorium.org/shop did not look as "professional" as (e.g.) http://www.hlj.com ... any idea what that would mean?
You'd have to ask the person who made the comment to be sure, but maybe your site doesn't use "professional" techniques like fixed-width layouts. Or maybe there's something about the layout that they've come to associate with amateur sites (e.g., the text on a textured background image, vs black-on-white content areas with any images in the periphery).

FWIW, Nielsen's Alertbox article The Need for Web Design Standards addresses the need to "follow the crowd" when it comes to certain design conventions. It's an extension of the basic idea that users spend most of their time elsewhere, so it's better to adapt your site to your users than to expect them to adapt to your site.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 29 2007, 11:42 PM
Post #9


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(Darin McGrew @ Oct 30 2007, 10:44 AM) *

QUOTE(Brian Chandler @ Oct 7 2007, 01:07 AM) *
But this stuff about replacing

shop.com?product=E11053

with

shop.com/product/E11053

all seems a bit misguided to me. First, it is actually slightly _less_ transparent to the user, and secondly it means replacing HTML forms with troublesome Javascript ("AJAX" etc). Seems like a step backwards to me.
I suppose using the query string makes it more transparent that the server is generating pages, rather than delivering HTML files. But does this transparency really matter? To me, it seems a matter of style. Pick one, and go with it.



Yes, sure, I only said it makes it _slightly_ less transparent. The transparency just makes it obvious that the URL represents a form submission. In some cases the "directory tree" style might indeed be a good representation.

QUOTE


I don't understand the argument about JavaScript/AJAX at all. If the server-side program is designed to extract the necessary information from the URL's path rather than from the URL's query string, then why should any client-side technique be necessary?



Because in general these URLs have to be *generated* from a form! There may be radio buttons to select an image, and Submit buttons for different verbs (like 'Zoom in', 'Zoom out', 'Whatever'). The form would submit a URL like

xyz/pics/twiddle.php?action=zoomin&pic=sunset53

Unless you are going to have two different URLs for every submission (which _really_ is silly), you need scripting to mangle this into the other form:

xyz/pics/twiddle/zoomin/sunset53

QUOTE


QUOTE(Brian Chandler @ Oct 7 2007, 01:07 AM) *
I came across an interesting comment recently where some people were discussing whether the jigsaw puzzles I sell might be imitation versions, because they were too cheap(!) - and someone said they thought my website http://imaginatorium.org/shop did not look as "professional" as (e.g.) http://www.hlj.com ... any idea what that would mean?
You'd have to ask the person who made the comment to be sure, but maybe your site doesn't use "professional" techniques like fixed-width layouts. Or maybe there's something about the layout that they've come to associate with amateur sites (e.g., the text on a textured background image, vs black-on-white content areas with any images in the periphery).

FWIW, Nielsen's Alertbox article The Need for Web Design Standards addresses the need to "follow the crowd" when it comes to certain design conventions. It's an extension of the basic idea that users spend most of their time elsewhere, so it's better to adapt your site to your users than to expect them to adapt to your site.


Thanks for the comments. Yes, I too wondered if it wasn't "rectangular" enough. I mean that the pages (I hope!) don't _look_ as though they are generated from a database.

At one stage I wondered if LCD early adopters might have found the textured background suboptimal, but looking at in on my 1280x1024 (?I think), the text is all a bit gritty, but the background is barely discernibly textured, which is what I intended.

(JN is right about reinventing the wheel, of course.)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th April 2024 - 04:35 PM