SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to rewrite urls

    Hi

    The script that I am using on one of my sites, the urls aren't user friendly, they are like this

    http://www.mysite.com/Page/15.html

    Is there an easy way without having to contact the developers, to change them to more friendly ones, like:

    http://www.mysite.com/Page/Contact_Us.html

    Thanks in advance

    D
    Last edited by Stevie D; Feb 15, 2013 at 06:14. Reason: Example URLs de-linked

  2. #2
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Dannilee View Post
    Hi

    The script that I am using on one of my sites, the urls aren't user friendly, they are like this

    http://www.mysite.com/Page/15.html

    Is there an easy way without having to contact the developers, to change them to more friendly ones, like:

    http://www.mysite.com/Page/Contact_Us.html

    Thanks in advance

    D
    Hi,

    In your example is 15.html actually the contact page so you may want http://www.mysite.com/Page/15.html to look like http://www.mysite.com/Page/contact
    ictus==""

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,656
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Danni,

    Actually, no but only because 15 does not translate to ContactUs.

    You might benefit from reading the mod_rewrite tutorial linked in my signature as it contains explanations and sample code. It's helped may members and should help you, too. One of the first things you'll learn there is that YOU create the new format for your links and then teach (via regex) mod_rewrite how to convert that to something Apache can serve.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Tags for this Thread

Bookmarks

Posting Permissions

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