Web Hosting Talk







View Full Version : backend


[Avarice]
09-18-2000, 06:22 PM
how do i make it so that my URL says http://www.blah.com/article.html?artID=5pgID=1
also what is going on in that URL? what does that "?" do?

jtan15
09-18-2000, 07:15 PM
Originally posted by [Avarice]
how do i make it so that my URL says http://www.blah.com/article.html?artID=5pgID=1
also what is going on in that URL? what does that "?" do?

That would be done with a perl script. The ?artID=5&pgID=1 are the parameters passed to the page. A perl script could read those parameters and do something with them. E.g. if you wanted to do ?image=main.gif, then you could get the web page to display main.gif.

The ? simply separates the parameters from the web page you are viewing.

If you want the perl code to do it, send me an e-mail at vince@jtan.com. I'd be glad to give it to you. :)

Chicken
09-18-2000, 07:34 PM
Not that this has anything to do with your question really, but maybe you were unaware of something... you can add "?anything" to the end of a link, and the link will work.

Eh? Well, this is sometimes useful for tracking purposes, maybe even referral reasons, but to give you an example, let's say my website is http://woobster.com . Now if you wanted to link to my site, I could ask you to use the link http://woobster.com/?AVARICE which would show up in my logs as the page that was accessed. If I see 5 hits for this page, then I know that your link sent me 5 hits.

This is really uselful if you don't have access to referer logs (logs that will tell you where your hits came from).

Just another possible reason you might see a "?" used on the web...

Félix C.Courtemanche
09-18-2000, 07:35 PM
if the extension of your file is .html, most likely it is javascript parsing.
.pl or .cgi is usually handled by perl, .php .php3 .phtml by PHP3 & 4, .cfm by ColdFusion and .asp by ...ASP :)

I'm sure I missed some. Anyway, if your srver does not support any of the above language, you will need to go with Javascript. It is much less efficient and usefull though.

As to have the url... simply add the ?var1=data1&var2=data2
etc.

that would mean to the web page that the variable 1 equals data1, etc.

It is a way to send data on the url, instead of using POST (forms) or cookies.

Félix C.Courtemanche
09-18-2000, 07:38 PM
Originally posted by Chicken
Not that this has anything to do with your question really, but maybe you were unaware of something... you can add "?anything" to the end of a link, and the link will work.


You could also use:
http://www.mydomain.com/index.html/pass/some/vars/here

The file index.html will be displayed (I am not sure if this works when not using Apache) and the remaining info will be sent as complimentary info... you can then do whatever you want with it.

Note that the above trick will sucessfully fool most search engine into thinking you have a non-dynamic site and wander through your whole web site.

Interesting, isn't it?