SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2013
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Friendly urls without .htaccess or mod_rewrite

    Hello,

    Is there a way to rewrite my urls from:

    http://www.website.nl/?p=4

    to

    http://www.website.nl/about-us

    without using mod_rewrite and .htaccess?

    I dont have the permission to turn on mod_rewrite and our organisation doesnt want it either. Is there a way to realise this with php only?

    Thanks in advance

    Kind Regards

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,183
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    As far as I'm aware there is no other possible way to achieve this without mod_rewrite been enabled, you could use a very hacky folder structure that emulates it but that would be a nightmare to maintain.
    Blog/Portfolio | Evolution Xtreme | DFG Design | DFG Hosting | CSS-Tricks | Stack Overflow | Paul Irish
    Having lame problems with your code? Let us help by using a jsFiddle

  3. #3
    SitePoint Addict Banana Man's Avatar
    Join Date
    Dec 2005
    Posts
    389
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You could rename the folders to what you want and then just hard code the GET parameters for each individual page. It would be messy if its a large site but if its not too big it shouldnt be a problem.

  4. #4
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,150
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    You could use FallbackResource instead of mod_rewrite.
    "First make it work. Then make it better."


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
  •