Hi,
I'm trying to work out if it's possible to do redirections for PHP page
controllers like so:
^/(.*)/(,*)$ redirects to /$1.php&some_parameter=$2
^/(.*)$ redirects to /$1.php
With an added rule to fall back to if $1.php doesn't actually exist.
^/(.*)/(.*)$ redirects to /index.php&some_parameter=$2
^/(.*)$ redirects to /index.php
I've previously just written a similar rule (in Cherokee and Apache) for
each page like:
/my_page/(.*)$ redirects to /my_page.php?param=$1
which works but can end up with loads of rules.
Currently I have the $1.php redirection working but it gives an internal
server error if i try to access the site root. The redirection rule is set
to non final just below my PHP rule.
Thanks in advance
I'm trying to work out if it's possible to do redirections for PHP page
controllers like so:
^/(.*)/(,*)$ redirects to /$1.php&some_parameter=$2
^/(.*)$ redirects to /$1.php
With an added rule to fall back to if $1.php doesn't actually exist.
^/(.*)/(.*)$ redirects to /index.php&some_parameter=$2
^/(.*)$ redirects to /index.php
I've previously just written a similar rule (in Cherokee and Apache) for
each page like:
/my_page/(.*)$ redirects to /my_page.php?param=$1
which works but can end up with loads of rules.
Currently I have the $1.php redirection working but it gives an internal
server error if i try to access the site root. The redirection rule is set
to non final just below my PHP rule.
Thanks in advance