Forum Moderators: phranque
RewriteRule ^([^/.]+)\.html$ /index.php?content=$1 [L]
RewriteRule ^([^/]+)/([^/.]+)\.html$ /index.php?content=$1&manufacturer=$2 [L]
RewriteRule ^([^/]+)/([^/.]+)/machine%20shop/\.html$ /index.php?content=$1&service=$2 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/.]+)\.html$ /index.php?content=$1&product=$2&service=$3 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/.]+)\.html$ /index.php?content=$1&MID=$2&category=$3&manufacturer=$4 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/.]+)\.html$ /index.php?content=$1&part=$2&category=$3&MID=$4&manufacturer=$5 [L] Currently the rules rewrite to .html
and I would like them to rewrite to .php
Currently the rules rewrite to .html, and I would like them to rewrite to .php just for consistency with other pages that are stand alone. However, when I change the .html to .php, I get a "Error 500. Server encountered an error due to..." and the entire site is down.
RewriteRule ^([^/.]+)\.php$ /index.php?content=$1 [L]
RewriteRule ^([^/]+)/([^/.]+)\.php$ /index.php?content=$1&manufacturer=$2 [L]
RewriteRule ^([^/]+)/([^/.]+)/machine%20shop/\.php$ /index.php?content=$1&service=$2 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/.]+)\.php$ /index.php?content=$1&product=$2&service=$3 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/.]+)\.php$ /index.php?content=$1&MID=$2&category=$3&manufacturer=$4 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/.]+)\.php$ /index.php?content=$1&part=$2&category=$3&MID=$4&manufacturer=$5 [L] RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/.]+)\.html$ /index.php?content=$1&MID=$2&category=$3&manufacturer=$4 [L]
/index.php?content=$1 the new internal pointer again matches the ^([^/.]+)\.php$ pattern in the very first rule and will be rewritten again, then matches again and is rewritten again and again and again. http://www.example.com/home.php
translates to
http://www.example.com/index.php?content=home
Requests for http://www.example.com/ are rewritten to fetch content from the internal path /index.php?content=home" Requests for http://www.example.com/index.php?content=home are redirected to http://www.example.com/"