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 2 of 2

Thread: url types :)

  1. #1
    New Coder
    Join Date
    Jul 2012
    Location
    UK
    Posts
    38
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Cool url types :)

    HI there,

    i have come across:

    a) ...........index.php?page=nothing

    instead of:

    b) ......../nothing.php


    when i tried doing "a" it did not work, it just stayed on the index.php!
    So, how do i go about using the first technique? And how does it work?
    Thanks!!!

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    That simply accepts the querystring into index.php. You then need to program what to do with it:
    PHP Code:
    if (isset($_GET['page']))
    {
        switch (
    $_GET['page'])
        {
            case 
    'nothing':
                
    header('Location: http://yoursite.com/nothing.php');
                exit();
                break;
        }

    For example.


  •  

    Posting Permissions

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