CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Apache configuration (http://www.codingforums.com/forumdisplay.php?f=69)
-   -   HtAccess Redirects (http://www.codingforums.com/showthread.php?t=27212)

mr_ego 10-05-2003 10:32 AM

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?

firepages 10-13-2003 04:48 AM

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


All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.