Helpful Information
 
 
Category: Apache configuration
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:



http://www.address.com/html/xyz/csv/welcome.html


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



[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?

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










privacy (GDPR)