I'm having the weirdest problem with a previous developer's URL rewrites after moving this custom CMS to a new server. Observe this snippet of the .htaccess file:
RewriteEngine On # If the URL doesn't end in a slash, redirect them to the equivalent that does (for canonical/SEO purporses) RewriteCond %{REQUEST_URI} !.*/$ RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteRule ^(health|nutrition|fitness|directory|coupons|download|kids|faq|signup|menu|snp|myaccount|myschool|printmenu)(.*)$ /$1$2/ [R=301,L,QSA,NS] # Health Pages RewriteRule ^health/$ health.php [L] RewriteRule ^health/([^/]+)/$ health.php?title=$1 [L] RewriteRule ^health/([^/]+)/([^/]+)/$ health_article_details.php?cat=$1&title=$2 [L] The first part of the Health rewrite:
# Health Pages RewriteRule ^health/$ health.php [L] works as expected, but:
RewriteRule ^health/([^/]+)/$ health.php?title=$1 [L] RewriteRule ^health/([^/]+)/([^/]+)/$ health_article_details.php?cat=$1&title=$2 [L] don't forward the rest of the URL segment as an argument. I threw a print_r($_REQUEST); in at the start of health.php and with a URL of http://www.foo.com/health/a/b/, I get this output:
Array () Why is this happening instead of:
Array ( [title] => a ) Any suggestions would be very appreciated!