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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.