How to differentiate document requests from variable requests? and how to allow for urls that are no
Posted
by Lucas
on Stack Overflow
See other posts from Stack Overflow
or by Lucas
Published on 2010-04-09T00:42:14Z
Indexed on
2010/04/09
1:43 UTC
Read the original article
Hit count: 367
Hello.
My last post was met by smarmy, unhelpful "answers" (comments), so i'll get right to it:
if I have an htaccess file like so:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^([^/]+)/([^/]+)$ /index.php?page=$1&subject=$2
RewriteRule ^([^/]+)$ /index.php?page=$1 [L]
how can I allow for other url variable names and values to be handled... say for instance I want to add extra unexpected url vars to this scenario
/page/subject?urlvar1=value1&urlvar2=value2
and get the page I want without creating unexpected results?
Any real help is greatly appreciated. Thanks!
© Stack Overflow or respective owner