Короче вот перевел.
Не тестил. Буду тестить после Вас ))))
Значит так....
В корневой ".htaccess" добавляем:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^Art\.html$ articles.php [N]
RewriteRule ^Art-kat-([0-9]+)\.html$ articles.php?cat_id=$1 [L]
RewriteRule ^Read-article([0-9]+)\.html$ readarticle.php?article_id=$1 [L]
RewriteRule ^index\.html$ index.php [N]
RewriteRule ^Upload\.html$ downloads.php [N]
RewriteRule ^FAQ\.html$ faq.php [N]
RewriteRule ^Links\.html$ weblinks.php [N]
RewriteRule ^Novosti-kat\.html$ news_cats.php [N]
RewriteRule ^News\.html$ news.php [N]
RewriteRule ^Poisk-po-novostyam([0-9]+)\.html$ news.php?readmore=$1 [L]
RewriteRule ^Kontakt\.html$ contact.php [N]
RewriteRule ^Fotogalereya\.html$ photogallery.php [N]
RewriteRule ^Poisk-po-Forumu\.html$ search.php?stype=f [N]
RewriteRule ^Poisk\.html$ search.php [N]
RewriteRule ^Profil-([0-9]+)\.html$ profile.php?lookup=$1 [L]
RewriteRule ^FotoAlbom-album-([0-9]+)\.html$ photogallery.php?album_id=$1 [L]
RewriteRule ^FotoAlbom-foto-([0-9]+)\.html$ photogallery.php?photo_id=$1 [L]
RewriteRule ^FotoAlbom-foto-upload-([0-9]+)\.html$ showphoto.php?photo_id=$1 [L]
RewriteRule ^Upload-kat-([0-9]+)\.html$ downloads.php?cat_id=$1 [L]
RewriteRule ^Upload-kat-([0-9]+)-pobierz-([0-9]+)\.html$ downloads.php?cat_id=$1&download_id=$2 [L]
RewriteRule ^FAQ-kategoria-([0-9]+)\.html$ faq.php?cat_id=$1 [L]
RewriteRule ^Web-katalog-([0-9]+)\.html$ weblinks.php?cat_id=$1 [L]
RewriteRule ^Web-katalog-([0-9]+)-strone-([0-9]+)\.html$ weblinks.php?cat_id=$1&weblink_id=$2 [L]
RewriteRule ^Raspe4atka-novosti--([0-9]+)\.html$ print.php?type=N&item_id=$1 [L]
RewriteRule ^Raspe4atka-statiy-([0-9]+)\.html$ print.php?type=A&item_id=$1 [L]
RewriteRule ^Registraciya\.html$ register.php [N]
RewriteRule ^BOCCTAHOBKA-passaworda\.html$ lostpassword.php [N]
В ".htaccess" находящийся в папке Forum дописываем:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/forum/(.*)$
RewriteRule ^Forum\.html$ forum/index.php [L]
RewriteRule ^Forum-([0-9]+)\.html$ forum/viewforum.php?forum_id=$1 [L]
RewriteRule ^Forum-([0-9]+)-tema-([0-9]+)\.html$ forum/viewthread.php?forum_id=$1&thread_id=$2 [L]
RewriteRule ^cz-([0-9]+)-Forum-([0-9]+)-tema-([0-9]+)\.html$ forum/viewthread.php?rowstart=$1&forum_id=$2&thread_id=$3 [L]
RewriteRule ^Forum-([0-9]+)-tema-([0-9]+)-post-([0-9]+)\.html$ forum/viewthread.php?forum_id=$1&thread_id=$2&pid=$3 [L]
RewriteRule ^Forum-([0-9]+)-tema-([0-9]+)-cz-([0-9]+)\.html$ forum/viewthread.php?forum_id=$1&thread_id=$2&rowstart=$3 [L]
RewriteRule ^Redaktirovanie([0-9]+)-tema-([0-9]+)-post-([0-9]+)\.html$ forum/post.php?action=edit&forum_id=$1&thread_id=$2&post_id=$3 [L]
RewriteRule ^odp-Forum-([0-9]+)-tema-([0-9]+)\.html$ forum/post.php?action=reply&forum_id=$1&thread_id=$2 [L]
RewriteRule ^odp-Forum-([0-9]+)-tema-([0-9]+)-post-([0-9]+)-cyt-([0-9]+)\.html$ forum/post.php?action=reply&forum_id=$1&thread_id=$2&post_id=$3"e=$4 [L]
RewriteRule ^Navaya-tema([0-9]+)\.html$ forum/post.php?action=newthread&forum_id=$1 [L]
И в файле maincore.php (корень)
Строку
// Start Output Buffering
ob_start();
ЗАМЕНЯЕМ на:
// Change links to F-url
function f_url($buf) {
if(!substr_count($_SERVER[REQUEST_URI],"administration")){
$buf = preg_replace('#readarticle\.php\?article_id=([0-9]*?)(\'|")#si', 'Read-article\1.html\2', $buf);
$buf = preg_replace('#articles\.php\?cat_id=([0-9]*?)(\'|")#si', 'Art-kat-\1.html\2', $buf);
$buf = preg_replace('#articles\.php#si', 'Art.html', $buf);
$buf = preg_replace('#downloads\.php\?cat_id=([0-9]*?)(\'|")#si', 'Upload-kat-\1.html\2', $buf);
$buf = preg_replace('#downloads\.php\?cat_id=([0-9]*?)(&|&)download_id=([0-9]*?)(\'|")#si', 'Upload-kat-\1-pobierz-\3.html\4', $buf);
$buf = preg_replace('#downloads\.php#si', 'Upload.html', $buf);
$buf = preg_replace('#faq\.php\?cat_id=([0-9]*?)(\'|")#si', 'FAQ-kategoria-\1.html\2', $buf);
$buf = preg_replace('#faq\.php#si', 'FAQ.html', $buf);
$buf = preg_replace('#Forum/index\.php#si', 'Forum/Forum.html', $buf);
$buf = preg_replace('#viewForum\.php\?Forum_id=([0-9]*?)(\'|")#si', 'Forum-\1.html\2', $buf);
$buf = preg_replace('#viewthread\.php\?Forum_id=([0-9]*?)(&|&)thread_id=([0-9]*?)(\'|")#si', 'Forum-\1-tema-\3.html\4', $buf);
$buf = preg_replace('#viewthread\.php\?rowstart=([0-9]*?)(&|&)Forum_id=([0-9]*?)(&|&)thread_id=([0-9]*?)(\'|")#si', 'cz-\1-Forum-\3-tema-\5.html\6', $buf);
$buf = preg_replace('#viewthread\.php\?Forum_id=([0-9]*?)(&|&)thread_id=([0-9]*?)(&|&)pid=([0-9]*?)\#post_([0-9]*?)(\'|")#si'
;, 'Forum-\1-tema-\3-post-\5.html#post_\6\7', $buf);
$buf = preg_replace('#post\.php\?action=newthread(&|&)Forum_id=([0-9]*?)(\'|")#si', 'Navaya-tema\2.html\3', $buf);
$buf = preg_replace('#viewthread\.php\?Forum_id=([0-9]*?)(&|&)thread_id=([0-9]*?)(&|&)rowstart=([0-9]*?)(\'|")#si', 'Forum-\1-tema-\3-cz-\5.html\6', $buf);
$buf = preg_replace('#post\.php\?action=edit(&|&)Forum_id=([0-9]*?)(&|&)thread_id=([0-9]*?)(&|&)post_id=([0-9]*?)(\'|")#si', 'Redaktirovanie\2-tema-\4-post-\6.html\7', $buf);
$buf = preg_replace('#post\.php\?action=reply(&|&)Forum_id=([0-9]*?)(&|&)thread_id=([0-9]*?)(\'|")#si', 'odp-Forum-\2-tema-\4.html\5', $buf);
$buf = preg_replace('#post\.php\?action=reply(&|&)Forum_id=([0-9]*?)(&|&)thread_id=([0-9]*?)(&|&)post_id=([0-9]*?)(&|&)quote=([0-9]*?)(\'
|")#si', 'odp-Forum-\2-tema-\4-post-\6-cyt-\8.html\9', $buf);
$buf = preg_replace('#weblinks\.php\?cat_id=([0-9]*?)(\'|")#si', 'Web-katalog-\1.html\2', $buf);
$buf = preg_replace('#weblinks\.php\?cat_id=([0-9]*?)(&|&)weblink_id=([0-9]*?)(\'|")#si', 'Web-katalog-\1-strone-\3.html\4', $buf);
$buf = preg_replace('#weblinks\.php#si', 'Links.html', $buf);
$buf = preg_replace('#news_cats\.php#si', 'Novosti-kat.html', $buf);
$buf = preg_replace('#news\.php\?readmore=([0-9]*?)(\'|")#si', 'Poisk-po-novostyam\1.html\2', $buf);
$buf = preg_replace('#contact\.php#si', 'Kontakt.html', $buf);
$buf = preg_replace('#photogallery\.php\?album_id=([0-9]*?)(\'|")#si', 'FotoAlbom-album-\1.html\2', $buf);
$buf = preg_replace('#photogallery\.php\?photo_id=([0-9]*?)(\'|")#si', 'FotoAlbom-foto-\1.html\2', $buf);
$buf = preg_replace('#showphoto\.php\?photo_id=([0-9]*?)(\'|")#si', 'FotoAlbom-foto-upload-\1.html\2', $buf);
$buf = preg_replace('#photogallery\.php#si', 'Fotogalereya.html', $buf);
$buf = preg_replace('#search\.php\?stype=f#si', 'Poisk-po-Forumu.html', $buf);
$buf = preg_replace('#search\.php#si', 'Poisk.html', $buf);
$buf = preg_replace('#profile\.php\?lookup=([0-9]*?)(\'|")#si', 'Profil-\1.html\2', $buf);
$buf = preg_replace('#print\.php\?type=N(&|&)item_id=([0-9]*?)(\'|")#si', 'Raspe4atka-novosti--\2.html\3', $buf);
$buf = preg_replace('#print\.php\?type=A(&|&)item_id=([0-9]*?)(\'|")#si', 'Raspe4atka-statiy-\2.html\3', $buf);
if(!substr_count($_SERVER[REQUEST_URI],"Forum")) $buf = preg_replace('#index\.php#si', 'index.html', $buf);
$buf = preg_replace('#register\.php#si', 'Registraciya.html', $buf);
$buf = preg_replace('#lostpassword\.php#si', 'BOCCTAHOBKA-passaworda.html', $buf);
$buf = preg_replace('#ion/index\.html#si', 'ion/index.php', $buf);
}
return $buf;
}
// Start Output Buffering
ob_start("f_url");
Теоритически должно работать...
Сам не тестил, потому что - на сайте много людей.... Мало ли там..... |
|