...

View Full Version : URL website.com/v=something



RonnyNishimoto
08-02-2012, 02:35 AM
I saw some websites that have something.com/v=something instead of something.com/?v=something, which is for passing variables in the URL. I was wondering how they were able to get it without a question mark, and in all honesty, what is it? Is it still just passing variables in the URL?

Thank you! :cool:

AndrewGSW
08-02-2012, 03:28 AM
The equal sign is a valid character in a uri. The value v=something is not recognised as a GET data-item, so would need to be manually parsed (extracted) from the url if it meant something within the page/script.

It is a little odd to use this format though.

DrDOS
08-02-2012, 05:38 AM
I'm thinking it may be done with javascript, since javascript can read the URL and use split to separate at the =.

RonnyNishimoto
08-02-2012, 07:07 AM
that's true, but I've researched and haven't found a method? Did they name the file that or something?

Arcticwarrio
08-02-2012, 12:03 PM
you can set which character default ? to use for variables in php.ini somewhere so i'm assuming you can also do it in .htaccess

tangoforce
08-02-2012, 01:38 PM
I saw some websites that have something.com/v=something instead of something.com/?v=something, which is for passing variables in the URL. I was wondering how they were able to get it without a question mark, and in all honesty, what is it? Is it still just passing variables in the URL?

Thank you! :cool:

The webserver will always serve the file requested. If it can't be found then its a 404 job. Now if you use a crafty .htaccess trick to replace the 404 page with the default page such as index.php..

The file (assuming php) can then extract this data from the url itself and use it in whatever way it see's fit :thumbsup:

Personally though if the likes of youtube are happy to use the ? then I don't see why it should bother anyone else. Even google use the question mark.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum