Thread: Static URL

    #1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    On planet earth
    Posts
    94
    Rep Power
    10

    Static URL


    I've just finished my first website, currently going under beta testing.

    The thing is that I need a static url so it shows only the site's address in the url bar. Because I am not well versed in the dark arts of doing this

    EXAMPLE ONLY:
    This is what I mean by static, this is the example I want done

    http://forums.devshed.com/
    and not keep it like this
    http://forums.devshed.com/php-development-5/cms-?@&949767.html
    etc, etc...

    How would I go about it to rewrite???? the url address to keep static all the time
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    How do you plan on any of your pages working if the URL never changes? Do you know of any other site on which the URL never changes?

    If you architected the site from the very beginning with this in mind you could have used ajax and some backend trickery to manage this, but it's not something you slap on at the end of a project. The URL determines which page you're on, end of sentence.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    so let me get this straight even if i go to http://forums.devshed.com/anotherpage you still want the url to stay http://forums.devshed.com/

    why would you do this? it will create confusion, SEO problems, user problems (bookmarking?) etc.

    please correct me if i have got it wrong?

    if i am still correct you could do something like:

    page 1 link would be: www.yoursite.com/redirect.php?page=login.php

    your redirect page will then "store the page GET variable" in a session and take you back to http://forums.devshed.com/ where you will check if session page exists, if it does you "include" that page..
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    On planet earth
    Posts
    94
    Rep Power
    10
    Originally Posted by ManiacDan
    How do you plan on any of your pages working if the URL never changes? Do you know of any other site on which the URL never changes?

    If you architected the site from the very beginning with this in mind you could have used ajax and some backend trickery to manage this, but it's not something you slap on at the end of a project. The URL determines which page you're on, end of sentence.
    It's complicated, one of the pages never changes at all, just display what I want on it i.e. queries the database as to what has to be displayed
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    On planet earth
    Posts
    94
    Rep Power
    10
    Originally Posted by paulh1983
    so let me get this straight even if i go to http://forums.devshed.com/anotherpage you still want the url to stay http://forums.devshed.com/

    why would you do this? it will create confusion, SEO problems, user problems (bookmarking?) etc.

    please correct me if i have got it wrong?

    if i am still correct you could do something like:

    page 1 link would be: www.yoursite.com/redirect.php?page=login.php

    your redirect page will then "store the page GET variable" in a session and take you back to http://forums.devshed.com/ where you will check if session page exists, if it does you "include" that page..
    All they would need is the front page i.e. index.php or index.html
  10. #6
  11. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    So you've made a one-page website already? Good, you're done.

    You have now stated twice that all the user needs is the home page. If this is not the case, think harder about your question and try to explain it.

    It's complicated, one of the pages never changes at all, just display what I want on it i.e. queries the database as to what has to be displayed
    That does sound complicated. it sounds complicated because you say it never changes, it changes every time. Which is it?
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  12. #7
  13. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    On planet earth
    Posts
    94
    Rep Power
    10
    Originally Posted by ManiacDan
    So you've made a one-page website already? Good, you're done.

    You have now stated twice that all the user needs is the home page. If this is not the case, think harder about your question and try to explain it.

    That does sound complicated. it sounds complicated because you say it never changes, it changes every time. Which is it?
    Nope, multiple page website, just that I want to constrain the amount of time working on individual i.e. one page fits all no need to do multiple of the same thing
  14. #8
  15. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    Nope, multiple page website
    Then each page needs some way of accessing it, like a URL.

    just that I want to constrain the amount of time working on individual i.e. one page fits all no need to do multiple of the same thing
    The lack of punctuation in this fragment makes it a bit confusing...are you trying to...
    A) ...prevent the USER from performing too many activities on a single page and/or prevent the user from having to navigate between pages too oftem?
    B) ...avoid having to update multiple files whenever you make a change to your website?

    If A, that's basic UI design and there's no need to change the URL at all.

    If B, you never should have said "URL" in the first place, you're talking about templates.

    Either way, from what I'm getting out of your explanations, the URL is completely irrelevant. You haven't given any reason you should be thinking about the URL at all. Explain the actual problem
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  16. #9
  17. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    On planet earth
    Posts
    94
    Rep Power
    10
    Oh crikey, I think I will talk to someone else if you can't understand me
  18. #10
  19. No Profile Picture
    Dazed&Confused
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2002
    Location
    Tempe, AZ
    Posts
    506
    Rep Power
    128
    What you're asking for so far doesn't make any sense.

    You say it's a "multiple page website" but that there's "no need to do multiple of the same thing".

    If all the pages are the same then there's no reason to have a multiple page website, unless for some obscure logging purposes which you haven't hinted at.

    Comments on this post

    • ManiacDan agrees
    LinkedIn: Dave Mittner
  20. #11
  21. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    Originally Posted by cssbonding
    Oh crikey, I think I will talk to someone else if you can't understand me
    Yes...it's definitely our fault. Good luck with your multi-page single-page website with URLs which shouldn't exist but yet still do things from the database dynamically. Or something. I'll go ahead and close this thread since no more help is needed and it's only going to devolve from here.

    Also, as a note: I asked you very explicit questions. I'll reproduce them here so you can think about them before you start another thread:

    Do you know of any other site on which the URL never changes?
    You have now stated twice that all the user needs is the home page. If this is not the case, think harder about your question and try to explain it.
    are you trying to...
    A) ...prevent the USER from performing too many activities on a single page and/or prevent the user from having to navigate between pages too oftem?
    B) ...avoid having to update multiple files whenever you make a change to your website?
    Last edited by ManiacDan; August 14th, 2013 at 12:25 PM.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo