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 7 of 7
  1. #1
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts

    Smile Hiding url extensions to show index only

    First off let me say that text support does not know what they are talking about.

    So Alot of my website is like index.php?do=account or like lottery.php?do=main

    I wanted it to show only the file name, so like index.php or lottery.php I would prefer to keep just the website showing with no file names shown, but that's unlikely to happen. I know no one will fully do it for me, but will someone direct me in what I need to look for and how to go about doing it? Thanks

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,500
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    You'll be looking on Google for: .htaccess rewrite rule

    I don't have an exact example, but there are many
    good tutorials. Perhaps someone on here might be
    good at .htaccess.

  • #3
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    Hmm alright I will look for htaccess and hiding urls. The tech support dude told me that I have to make html frames to hide it.

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    The only way to make the URL stay the same through out the site is to use frames or use AJAX both of which are horrible ideas to do because they cause more harm than good in that instance.

    The rewrite rules in htaccess work such that you can take a url such as:

    yoursite.com/article/22 and it would rewrite it on the server (as an example) to yoursite.com/article.php?id=22

    But there isn't a way using rewrite rules to make the URL be constant and frankly there aren't any good reasons to do so.
    OracleGuy

  • #5
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    So instead of index.php?do=main
    it's not possible to just show index.php?

  • #6
    Senior Coder
    Join Date
    Jul 2005
    Location
    UK
    Posts
    1,051
    Thanks
    6
    Thanked 13 Times in 13 Posts
    Yes it's possible, using frames as your tech support said, or Flash, or using AJAX, or just loading the entire site into one page as hidden layers and using javascript to swap from one div to the next. But people are telling you it's a poor idea, which it is.

  • #7
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    *sigh* ok I will ignor it.


  •  

    Posting Permissions

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