SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: URL Artistry

  1. #1
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URL Artistry

    Dear friends,

    I am working on a rewrite of a Buddhist scholastic website Sutta Central. Much work has gone into developing an HTML5/CSS presentation. I'm actually a Buddhist monk, but in a "past life" I wrote code for a living. I have taught myself PHP using the excellent books "PHP: Novice to Ninja" and "PHP Master" and thus came across this site. So, the actual question:

    Say I have a URL like this:

    http://suttacentral.net/browse.php?s...on&division=DN

    Is it possible somehow to display this page when you follow a link like this:

    http://suttacentral.net/Pali/DN

    Where Pali is a collection of divisions in the Pali language and DN denotes the "Digha Nikaya" division in this collection.

    Thanks in advance!

    Bhante Jhanarato
    Bodhinyana Monastery

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    This is generally achieved using Apaches mod_rewrite.

    I trust this marvellous text puts you on the path to enlightenment.

  3. #3
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear Cups,

    Thanks for the pointer. I suspected this was the way to do it (I think it mentions this technique in PHP Master), but I'm not sure I have privileges on the server to do so. I will investigate and discuss it with the dev team.

    Best wishes,

    J.R.

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    You could create a folder and then put a .htaccess file into that folder. If mod_rewrite is enabled on the server, then that rule should be applied.

    This post contains some really simple rules you could copy/paste into your .htaccess file to do this initial check.

    Good luck with this.

  5. #5
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear Cups,

    Thanks so much for your help. mod_rewrite is indeed enabled for our host.

    Cheers!

    J.R.


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
  •