+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 15
  1. #1
    A1 VIP Member
    Join Date
    Mar 2008
    Location
    Egypt/Cumbria
    Posts
    2,553
    Thanks
    608
    Thanked 322 Times in 256 Posts

    Default Removing .php frm url

    Am designing some help pages for my site ... myself and want to remove the .php from the url .. is there a way to do this?

    The pages all have a php file, a css file and an html file.

    I currently have this:

    www.mysite.co.uk/page.php

    and I want:

    www.mysite.co.uk/page

    but don't want it to have a sitewide effect just in case I bugger something up.

    Or does this not really matter for help pages?
    Country Couples - Friendship & dating for UK country singles

    Rural Diaries - blog Dating Advice - blog

  2. #2
    Super Moderator
    Join Date
    Apr 2008
    Location
    Leicester, UK
    Posts
    1,764
    Thanks
    451
    Thanked 288 Times in 261 Posts
    Blog Entries
    2

    Default

    Depends what is on your page. You gotta have something Sally. The page extension tells the browser/processor how to render the page (amongst other things depending on the format)

    .html - A straight forward web page coded without server side scripting
    .php - Hypertext preprocessor is a web page that runs server-side HTML embedded scripting language (dynamic data pulled from another source such as a database...like this forum)

    I would not worry about it unless you had a dynamic pag saved as .html then you would be in trouble.


    What did you expect to see here?

  3. The Following User Says Thank You to LOS Design UK For This Useful Post:

    sally (14-05-2009)

  4. #3
    A1 VIP Member
    Join Date
    Mar 2008
    Location
    Egypt/Cumbria
    Posts
    2,553
    Thanks
    608
    Thanked 322 Times in 256 Posts

    Default

    Thank you so much, I shall leave well enough alone then and let it say .php .. can't im,agine many people would want to remember the url for my help pages anyway.
    Country Couples - Friendship & dating for UK country singles

    Rural Diaries - blog Dating Advice - blog

  5. #4
    A1 VIP Member
    Join Date
    May 2009
    Posts
    100
    Thanks
    8
    Thanked 12 Times in 12 Posts

    Default

    Its a hack but you could always create a directory called /page and change your page dot php to index dot php and put it in the directory. I have done this before.

  6. #5
    Super Moderator
    Join Date
    Apr 2008
    Location
    Leicester, UK
    Posts
    1,764
    Thanks
    451
    Thanked 288 Times in 261 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by sally View Post
    Thank you so much, I shall leave well enough alone then and let it say .php .. can't im,agine many people would want to remember the url for my help pages anyway.
    Agreed. As with any website, all they need to remember (or look for) is YOUR WEBSITE NAME and then once they arrive, as long as the navigation is simply constructed and easy to use, they will find there way around.

    I for one, do not remember exact pages, just website names/urls and take it from there.

    Kindest Regards
    Daren



    What did you expect to see here?

  7. The Following User Says Thank You to LOS Design UK For This Useful Post:

    sally (16-05-2009)

  8. #6
    Super Moderator
    Join Date
    Apr 2008
    Location
    Leicester, UK
    Posts
    1,764
    Thanks
    451
    Thanked 288 Times in 261 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by benr123 View Post
    Its a hack but you could always create a directory called /page and change your page dot php to index dot php and put it in the directory. I have done this before.
    Why would you want to do that?

    It is not resolving the issue Sally thought she would have, it is just shifting the page into another folder with a different name, same extension?

    It is not a hack either I am afraid. A hack is there to fix a problem with a program (software) or hardware issue. There is no problem here to fix, just a little clarification as to what the extension was all about.

    Regards


    What did you expect to see here?

  9. #7
    A1 VIP Member
    Join Date
    May 2009
    Posts
    100
    Thanks
    8
    Thanked 12 Times in 12 Posts

    Default

    Quote Originally Posted by KeyMark Services View Post
    Why would you want to do that?

    It is not resolving the issue Sally thought she would have, it is just shifting the page into another folder with a different name, same extension?

    It is not a hack either I am afraid. A hack is there to fix a problem with a program (software) or hardware issue. There is no problem here to fix, just a little clarification as to what the extension was all about.

    Regards
    Apache will show index php files when you go to a directory (providing there is no index htm or index html).

    So if you have a site example.com/page It will display the index php file without having to type in index php. This is what the OP wanted to do.

    I use the term hack to mean something that isn't done in the correct way. Look on answers.

    Hack:1. n. Originally, a quick job that produces what is needed, but not well.

    Maybe I should use the term bodge job. Anyway, the proper way to do it would be to change the htaccess file but I prefer to just bodge my site.

  10. #8
    Super Moderator
    Join Date
    Apr 2008
    Location
    Leicester, UK
    Posts
    1,764
    Thanks
    451
    Thanked 288 Times in 261 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by benr123 View Post
    Apache will show index php files when you go to a directory (providing there is no index htm or index html).

    So if you have a site example.com/page It will display the index php file without having to type in index php. This is what the OP wanted to do.

    I use the term hack to mean something that isn't done in the correct way. Look on answers.

    Hack:1. n. Originally, a quick job that produces what is needed, but not well.

    Maybe I should use the term bodge job. Anyway, the proper way to do it would be to change the htaccess file but I prefer to just bodge my site.


    I am sure you don't bodge but made me chuckle.

    I see what you were after doing but as stated, I think Sally just needed to understand what the .ext do.

    Regards


    What did you expect to see here?

  11. #9
    A1 VIP Member
    Join Date
    Mar 2008
    Location
    Egypt/Cumbria
    Posts
    2,553
    Thanks
    608
    Thanked 322 Times in 256 Posts

    Default

    I was just asking because the help pages my script originally had didn't show the .php extension but the pages I am creating myself do, so I thought I was doing something wrong is all.
    Country Couples - Friendship & dating for UK country singles

    Rural Diaries - blog Dating Advice - blog

  12. #10
    I'm Getting to Know A1 A1 Member
    Join Date
    May 2009
    Posts
    34
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Hi Sally,

    It is completely possible using something called mod rewrite. I'm still not able to post links on this forum as im a new member but do a google search for 'mod rewrite'

    I have recently had to do this on one of my customer sites. PM me if you need more info or want me to send you some direct links.

    Best Wishses

    Rick

Similar Threads

  1. Removing sign writing
    By Chubster in forum Time Out
    Replies: 10
    Last Post: 17-06-2008, 10:41
  2. Urgent help re removing a watermark?
    By icequeen in forum Graphic Design, Web Design and Coding
    Replies: 5
    Last Post: 07-04-2008, 21:27

Tags for this Thread

Posting Permissions

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

Our Advertisers




Side Column
Text
Text
Text
Text
-->