Forum Moderators: phranque
ErrorDocument 404 /index.php If I am wrong my attempts have failed. RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.tld$
RewriteBase /
RewriteRule ^css/(.*\.css) /combine.php?type=css&files=$1
RewriteRule ^js/(.*\.js) /combine.php?type=javascript&files=$1
ErrorDocument 401 /index.php
ErrorDocument 404 /index.php
I have done this for the human side of things by creating a custom 404 redirect, so any URL takes you back to the index.php
RewriteEngine on
RewriteBase /
#
RewriteRule ^css/(.+\.css)$ /combine.php?type=css&files=$1 [L]
#
RewriteRule ^js/(.+\.js)$ /combine.php?type=javascript&files=$1 [L]
#
RewriteCond $1 !^(index|combine)\.php$
RewriteRule ^(.*)$ /index.php?files=$1 [L]