Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-04-2011, 06:18 PM   PM User | #1
addaminsane
New to the CF scene

 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
addaminsane is an unknown quantity at this point
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!
addaminsane is offline   Reply With Quote
Old 05-06-2011, 04:51 AM   PM User | #2
addaminsane
New to the CF scene

 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
addaminsane is an unknown quantity at this point
please, im dyin here
addaminsane is offline   Reply With Quote
Old 05-17-2011, 09:35 PM   PM User | #3
addaminsane
New to the CF scene

 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
addaminsane is an unknown quantity at this point
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.
addaminsane is offline   Reply With Quote
Old 06-22-2011, 01:53 PM   PM User | #4
jonnymula
New to the CF scene

 
Join Date: Jun 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
jonnymula is an unknown quantity at this point
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.
jonnymula is offline   Reply With Quote
Old 01-09-2012, 09:59 PM   PM User | #5
addaminsane
New to the CF scene

 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
addaminsane is an unknown quantity at this point
Im still hoping for an answer, if it would help, here is one of my sites i am trying to achieve this on.
addaminsane is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:57 AM.


Advertisement
Log in to turn off these ads.