Forum Moderators: phranque

Message Too Old, No Replies

rewriting urls in apache

changing /subdir/ to page.php?memeber=subdir

         

haydies

3:00 pm on Oct 23, 2003 (gmt 0)



Hi, I have a need to have virtual directories on a site.

Basicly I have a site www.mydomain.com and I need www.mydomain.com/subdir/ to point to www.mydomain.com and pass "subdir" as a parameter to the page. So www.mydomain.com/subdir/page.php would end up as www.mydomain.com/page.php?memeber=subdir or something.

To be honest how the param ends up in php dosn't matter, but I need to be able to go to any sub direcotry and for it to be passed through.

any body have any idea's?

Haydies.

jatar_k

3:21 pm on Oct 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld haydies,

It sounds like what you are looking for is mod_rewrite. Take a look at this thread
An Introduction to Redirecting URLs on an Apache Server [webmasterworld.com]