Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    85
    Thanks
    53
    Thanked 0 Times in 0 Posts

    URL website.com/v=something

    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!

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • Users who have thanked AndrewGSW for this post:

    RonnyNishimoto (08-03-2012)

  • #3
    Senior Coder
    Join Date
    Sep 2010
    Posts
    2,451
    Thanks
    17
    Thanked 275 Times in 275 Posts
    I'm thinking it may be done with javascript, since javascript can read the URL and use split to separate at the =.

  • #4
    New Coder
    Join Date
    Jul 2012
    Posts
    85
    Thanks
    53
    Thanked 0 Times in 0 Posts
    that's true, but I've researched and haven't found a method? Did they name the file that or something?

  • #5
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    727
    Thanks
    20
    Thanked 85 Times in 85 Posts
    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

  • #6
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,440
    Thanks
    62
    Thanked 537 Times in 524 Posts
    Quote Originally Posted by RonnyNishimoto View Post
    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!
    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

    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.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • Users who have thanked tangoforce for this post:

    RonnyNishimoto (08-03-2012)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •