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 10-05-2003, 10:32 AM   PM User | #1
mr_ego
Regular Coder

 
Join Date: Jun 2002
Location: Brisbane, Australia
Posts: 181
Thanks: 1
Thanked 0 Times in 0 Posts
mr_ego is an unknown quantity at this point
HtAccess Redirects

For the people who use HTACCESS..

I know there is a function/handler built into htaccess that will do the following.


If the url contains:

the htaccess file looks something like this
(i'm guessing with regular expressions).

Code:
[SOMETHING HERE] /html/(.*)/(.*).html pages.php?directory=$1&page=$2
you are actually viewing the file (but dont know it):

pages.php?directory=xyz/csv&page=welcome

Someone please; how do you do this?
__________________
-mR_eGo
_______________________
Programming since
3 years old.
mr_ego is offline   Reply With Quote
Old 10-13-2003, 04:48 AM   PM User | #2
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,901
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
google for mod_rewrite which is what you are looking for (there are examples in the apache manual)

or if you were using PHP or similar you could utilise the $_SERVER['PATH_INFO'] variable to do similar which is probably less of a resource sucker than mod_rewrite
__________________
resistance is...

MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)
firepages 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 09:29 PM.


Advertisement
Log in to turn off these ads.