Jump to content

files to folders whilst keeping query string


isedeasy

Recommended Posts

I want to have urls that look like the following:-

url - www.domain.com/login/

file - /sections/login.php

url - www.domain.com/contact/

file - /sections/contact.php

 

my index file just looks for the page name in the query string and includes the appropriate file. I have the following rule that sort of works but I need something that wont lose the rest of the query string.

 

RewriteRule ^([a-zA-Z\_]+)[/]*$ index.php?pl=$1

 

I need it so that

 

www.domain.com/home/?foo=bar

 

will send my index.php the following vars

 

$_GET['pl'];
$_GET['foo'];

 

foo could be anything and the amount of variables that can be passed back needs to be unlimited.

 

Any help would be much appreciated.

 

Thanks

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.