Файл .htaccess
Код | DirectoryIndex index.php Options -Indexes AddDefaultCharset windows-1251
RewriteEngine on RewriteRule - - [L]
RewriteRule ^([-a-zA-Z0-9_@]{1,20})/?$ index.php?module=$1 [L] RewriteRule ^([-a-zA-Z0-9_@]{1,20})/ID_([0-9]{1,20}).html/?$ index.php?module=$1&id=$2 [L] RewriteRule ^([-a-zA-Z0-9_@]{1,20})/PAGE_([0-9]{1,20}).html/?$ index.php?module=$1&page=$2 [L] RewriteRule ^admin/?$ engine/admin/index.php [L] </files>
|
Вопрос в следующем, как сделать страницу ошибок такую, чтобы другие адреса на работали, кроме выше перечисленных. И вследствие пересылало на страницу ошибок.
Структура такая:
Код | if(!isset($_GET['module'])){ $module = ""; }else{ $module = $_GET['module']; } switch( $module ) { case "articles": include_once( $root_path . $root_engine . $root_modules .'articles.php' ); break; case "news": include_once( $root_path . $root_engine . $root_modules .'news.php' ); break; case "faq": include_once( $root_path . $root_engine . $root_modules .'faq.php' ); break; default: include_once( $root_path . $root_engine . $root_modules .'index.php' ); break; }
|
|