ErrorDocument 404 /404.php разве недостаточно?
что вы имеете в виду file with no extension? разве апач не примет его как роут? Срасибо
RewriteEngine on
#If no extension rewrite to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\..*
RewriteRule ^(.*)$ index.php?router=$1 [L,QSA]
#else if has allowed extension redirect to no extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(php¦html¦htm)
RewriteRule ^(.*)\.(php¦html¦htm)$ $1 [R=303,L,QSA]
#else rewrite to nowhere
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ nowhere.php [L,QSA]
#init 404 file, can be skiped if nowhere.php returns 404 header
ErrorDocument 404 /404.php
RewriteEngine on
#If no extension rewrite to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\..*
RewriteRule ^(.*)$ index.php?router=$1 [L,QSA]
#else if has allowed extension redirect to no extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(php¦html¦htm)
RewriteRule ^(.*)\.(php¦html¦htm)$ $1 [R=303,L,QSA]
#else rewrite to nowhere
RewriteRule ^(.*)$ nowhere.php [L,QSA]
#init 404 file, can be skiped if nowhere.php returns 404 header
ErrorDocument 404 /404.php