#1 (permalink)  
Old 03-24-2008, 10:29 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
htaccess advice

I'm writing a very simple CMS application to make my life a little easier. I am currently developing the CMS to work the following way:

The root URL will be something like:
http://www.example.com/index.php

Any top level links will look like:
http://www.example.com/mypage/index.html (which will actually point to http://www.example.com/index.php?pagename=mypage)

Any links that specify "mypage" as their parent page will look like:
http://www.example.com/mypage/mylowerpage/index.html (which will actually point to http://www.example.com/index.php?pagename=mylowerpage)

As we go on down the outline, we will continue nesting directories depending on how the parent structure is set up.

Basically, I need to set up an htaccess file that will rewrite my URLs. I need the rewrite engine to pick up the last directory in the URL, whether that's the only directory or the 20th directory in the URL (for example, in http://www.example.com/dir1, it would pick up "dir1", but in http://www.example.com/dir1/dir2/dir...dir6/dir7/dir8, it would pick up "dir8" instead).

I basically have figured out how to do that, but I've run into a problem trying to figure out how to deal with the variance that may exist in the way the URLs are typed. For instance, obviously I want http://www.example.com/dir1/dir2 to lead to the same place as http://www.example.com/dir1/dir2/ and http://www.example.com/dir1/dir2/index.html.

Ideally, I would also like http://www.example.com/dir1/dir2.html to lead the same place, too.

Does anyone have any advice on how to set up my rewrite? Please help. Thank you.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote

  #2 (permalink)  
Old 03-24-2008, 04:30 PM
Allen's Avatar
Administrator
 
Join Date: Dec 2001
Location: Atlanta, Georgia, USA
Posts: 1,049
Why are you writing your own CMS when Drupal takes 5 minutes to install, an hour to template and you are done?
Reply With Quote
  #3 (permalink)  
Old 03-24-2008, 05:30 PM
Leprakawn's Avatar
Moderator
 
Join Date: Jan 2004
Location: Outside, and playing with your invisible friends.
Posts: 1,130
Send a message via AIM to Leprakawn Send a message via Yahoo to Leprakawn
I have no idea where I read it, but I recently read a lot of drupal sites are either getting a bunch of spam or getting hacked.
__________________
Like my spiffy, unique signature?
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Code:
         ...,,.,.,.
        /          \
__oooo__[///]--[\\\]__oooo__
Reply With Quote
  #4 (permalink)  
Old 03-25-2008, 08:06 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
The first problem with Drupal is that it's more of a blog script than a CMS. I will be using this to create a traditional Web site, not a collection of articles. Doing that with Drupal is certainly possible, but it takes a lot more customization.

The second problem with Drupal, or any other pre-made script, is that I want a few very specific features, and I don't really want anything else included with the script.

By the time you factor in all of the pros and cons of using a pre-built script for the CMS, it is actually more efficient to build my own.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #5 (permalink)  
Old 03-25-2008, 08:43 AM
Allen's Avatar
Administrator
 
Join Date: Dec 2001
Location: Atlanta, Georgia, USA
Posts: 1,049
Quote:
Originally Posted by curtiss View Post
The first problem with Drupal is that it's more of a blog script than a CMS. I will be using this to create a traditional Web site, not a collection of articles. Doing that with Drupal is certainly possible, but it takes a lot more customization.

The second problem with Drupal, or any other pre-made script, is that I want a few very specific features, and I don't really want anything else included with the script.

By the time you factor in all of the pros and cons of using a pre-built script for the CMS, it is actually more efficient to build my own.
drupal is as much a cms as any other tool on the market - the blog is one module but you can make pages just the same

but i get ya - if you want x-only features then yea build your own...
Reply With Quote
Reply


Thread Tools
Display Modes 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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free forum hosting advice... Marcus Product Reviews 4 10-11-2007 05:18 AM
Need Advice! abriend_lee SEO - Search Engine Optimization 4 09-04-2007 07:05 PM
help with htaccess Allen Programming and Scripting 7 05-13-2007 08:30 PM
Need Paint Shop Pro advice!!! MehndiMasala Product Reviews 6 02-18-2007 09:32 PM
htaccess redirects curtiss Servers 7 04-18-2006 08:41 AM


All times are GMT -5. The time now is 01:00 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter