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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remove Subfolder From URL - Old School Static PHP Site

    Hi Codingforums.com... i really need and appreciate help with a basic .htaccess rewriting task.

    Here's the deal... i'm working with an 'old school' static folder setup where every content page on the site is simply folders and subfolders containing an index.php file.

    Root Setup:

    /images
    /includes
    /css
    /content -- Top Level Pages And All There Sub Pages Stored Here.
    index.php -- Home Page

    My Page Structure From /content folder:

    /content/toppage/ ||||||||||||||| Top Category or Page if you will
    /content/toppage/sub1/ ||||||||| Sub Page of Top Page
    /content/toppage/sub2/sub3/ ||| Sub of A Sub

    How I would Like My URLs to be Rewritten

    /content/toppage/ ---------------------> site.com/toppage/
    /content/toppage/sub1/sub2/ ---------> site.com/toppage/sub2/
    /content/toppage/sub1/sub2/sub3/ ---> site.com/toppage/sub3/

    Essentially, the content folder will be removed from urls and then each top page's sub folders will never appear to be more than one folder away.

    I figure if someone can show me how to rewrite up to 3 levels like this, i'd be able to figure out more and be able to organize my topics with as many subfolders as i want

    thats about it. Obviously i still need my root folders such as images/ and includes/ & css/ to function like normal and the root index.php to be my home-page.

    THANKS for looking and appreciate the help!

  • #2
    New to the CF scene
    Join Date
    May 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    please, im dyin here

  • #3
    New to the CF scene
    Join Date
    May 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hard to believe there is really no useful / readable info on how to do what im asking in this thread on the entire web.... at least that i've been able to find searching. I'd assume many webmasters have rewrote their folder structures like im hoping to do.

  • #4
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ha I've also been experiencing problems with a situation simular to this .... any help would be well appreciated so please help out. Thanks in advance.

  • #5
    New to the CF scene
    Join Date
    May 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Im still hoping for an answer, if it would help, here is one of my sites i am trying to achieve this on.


  •  

    Posting Permissions

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