Page 1 of 1

.htaccess and Request vars

Posted: Thu May 11, 2006 8:01 pm
by phpCCore Brad
Okay first off I have a .htaccess file with the following:

Code: Select all

ErrorDocument 404 /index.php?pageLoader=true
Which redirects the users to a php document. The problem I am having is how can I transfer $_REQUEST vars to the php document? Or is this not possible?


Thanks,
Brad Bridges

Posted: Thu May 11, 2006 8:49 pm
by Christopher
The value for that request will be in $_REQUEST['pageLoader'].

Update

Posted: Fri May 12, 2006 10:32 am
by phpCCore Brad
Sorry if I didn't explain well. I was trying to find a way to transfer the request vars (post get etc) to the php document. I ended up chaning it to a rewrite rule:

Code: Select all

RewriteEngine on
RewriteRule ^([A-Za-z0-9-]+)/?$ /index.php?pageLoader=true&cmd=$1

The only problem with this is that it doesn't accept _ in the URL and I don't know practically anything about patterns, so I don't know how to change it.

Any help woul be greatly appreciated!

Thanks,
Brad Bridges

Posted: Fri May 12, 2006 1:03 pm
by timvw
Assuming you actually want to learn about regular expressions: viewtopic.php?t=33147...