Unico Опубликовано 11 Февраля 2010 Жалоба Поделиться Опубликовано 11 Февраля 2010 Обсуждалось ли это где?не нашел... глюк у меня нарисовался при создании новых тем...связано с тем, что появились 100 000 темысами темы создаются и доступны через динамические адреса... но должна была создаться тема http://example.com/forum/topic100022.html а создалась такая вот... и соотвественно нот фаунд.404 ошибка. http://example.com/forum/topic10002.html2 правила в хтакцесс такие... RewriteEngine OnRewriteRule ^index.htm index.php?%{QUERY_STRING}RewriteRule ^index.html index.php?%{QUERY_STRING}RewriteRule ^main.html index.php?act=idx&%{QUERY_STRING}RewriteRule ^forum([0-9]+)\.html$ index.php?showforum=$1&%{QUERY_STRING}RewriteRule ^topic([0-9]+)\.html$ index.php?showtopic=$1&%{QUERY_STRING}RewriteRule ^topic([0-9]+)\.html&st=([0-9]+)$ index.php?showtopic=$1&st=$2&%{QUERY_STRING}RewriteRule ^topic([0-9]+)s([0-9]+)\.html$ index.php?showtopic=$1&st=$2&%{QUERY_STRING}RewriteRule ^cat([0-9]+)\.html$ index.php?act=SC&c=$1&%{QUERY_STRING} насколько помню, вносились соответствующие корректировки и в пхп-файлы. помогите, срочно плиз )) Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 Sannis Опубликовано 11 Февраля 2010 Жалоба Поделиться Опубликовано 11 Февраля 2010 насколько помню, вносились соответствующие корректировки и в пхп-файлы.Какие? По какой инструкции? Телепатически это не решается. Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 Unico Опубликовано 11 Февраля 2010 Автор Жалоба Поделиться Опубликовано 11 Февраля 2010 по инструкции конечно...http://db.ibresource.ru/375/ но это было в году этак 2004...с тех пор возможно в хак внесли фиксы.. а может до этого глюка никто не доходил.все-таки 100 000 тем - это много для форума.форуму почти 7 лет. посмотрите, пож-та..нет ли где ошибок характерных для такого глюкаи возможно нужно проверить какую-то строчку у меня, если фиксы вносились... ------- // ******************************************************* // PHP to HTML convertor v2.0b for IPB2.0F // (с) UriSoft 2004 // ******************************************************* // Изменяемые файлы: // sources/functions.php // sources/classes/class_display.php // sources/misc/print_page.php // ----------------------------------------------------------------------------- // В файле sources/functions.php // ----------------------------------------------------------------------------- // Найти: // ----------------------------- /*-------------------------------------------------------------------------*/ // // Redirect using HTTP commands, not a page meta tag. // /*-------------------------------------------------------------------------*/ function boink_it($url) // ----------------------------- // Вставить выше: // ----------------------------- //------------------------------------------- // Hack. Convert php to html (class FUNC) //------------------------------------------- function do_php_to_html($buffer) { global $ibforums; if ($ibforums->vars['php_to_html'] == 1) { $forum_url = str_replace("/","\/",$ibforums->vars['board_url']); $forum_url = str_replace(":","\:",$forum_url); $forum_url = str_replace(".","\.",$forum_url); $s_search = array("'(\?|\&|\&)s=[0-9a-zA-Z]{32}(?:\&|\&)'i", "'(?:\&|\&)s=[0-9a-zA-Z]{32}'i", "'\?s=[0-9a-zA-Z]{32}'i"); $s_replace = array("\\1", "", ""); $search = array("'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=idx(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=idx'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=home(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=home'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=portal(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=portal'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showforum=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showforum=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=SF(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=SF(?:\&|\&)f=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=ST(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=ST(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=ST(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=ST(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=SC(?:\&|\&)c=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=SC(?:\&|\&)c=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?c=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?c=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=Print(?:\&|\&)client=printer(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showuser=([0-9]{1,5})(?:\&|\&)(\S*?)'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showuser=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?(?:\&|\&)*?act=Profile(?:\&|\&)CODE=03(?:\&|\&)MID=([0-9]{1,5})'i", "'".$forum_url."\/index\.php\?s='i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=(\S*?)'i", "'".$forum_url."\/index\.php\?(\S*?)'i", "'".$forum_url."\/index\.php'i"); $replace = array($ibforums->vars['board_url']."/main.html?\\1", $ibforums->vars['board_url']."/main.html", $ibforums->vars['board_url']."/index.html?\\1", $ibforums->vars['board_url']."/index.html", $ibforums->vars['board_url']."/index.html?\\1", $ibforums->vars['board_url']."/index.html", $ibforums->vars['board_url']."/forum\\1.html?\\2", $ibforums->vars['board_url']."/forum\\1.html", $ibforums->vars['board_url']."/forum\\1.html?\\2", $ibforums->vars['board_url']."/forum\\1.html", $ibforums->vars['board_url']."/topic\\1s\\2.html?\\3", $ibforums->vars['board_url']."/topic\\1s\\2.html", $ibforums->vars['board_url']."/topic\\1.html?\\2", $ibforums->vars['board_url']."/topic\\1.html", $ibforums->vars['board_url']."/topic\\2s\\3.html?\\4", $ibforums->vars['board_url']."/topic\\2s\\3.html", $ibforums->vars['board_url']."/topic\\2.html?\\3", $ibforums->vars['board_url']."/topic\\2.html", $ibforums->vars['board_url']."/cat\\1.html?\\2", $ibforums->vars['board_url']."/cat\\1.html", $ibforums->vars['board_url']."/cat\\1.html?\\2", $ibforums->vars['board_url']."/cat\\1.html", $ibforums->vars['board_url']."/ptopic\\2.html", $ibforums->vars['board_url']."/user\\1.html?\\2", $ibforums->vars['board_url']."/user\\1.html", $ibforums->vars['board_url']."/user\\1.html", $ibforums->vars['board_url']."/index.html", $ibforums->vars['board_url']."/ipb.html?act=\\1", $ibforums->vars['board_url']."/ipb.html?\\1", $ibforums->vars['board_url']."/index.html"); $buffer = preg_replace($s_search,$s_replace,$buffer); $buffer = preg_replace($search,$replace,$buffer); } return $buffer; } // ----------------------------- // Найти: // ----------------------------- function boink_it($url) { global $ibforums; // ----------------------------- // Вставить ниже: // ----------------------------- $url = $this->do_php_to_html($url); // ----------------------------------------------------------------------------- // В файле sources/classes/class_display.php // ----------------------------------------------------------------------------- // Найти: // ----------------------------- /*-------------------------------------------------------------------------*/ // // Parses all the information and prints it. // /*-------------------------------------------------------------------------*/ function do_output($output_array) { // ----------------------------- // Вставить выше: // ----------------------------- //------------------------------------------- // Hack. Convert php to html (class display) //------------------------------------------- function do_php_to_html($buffer) { global $ibforums; if ($ibforums->vars['php_to_html'] == 1) { $forum_url = str_replace("/","\/",$ibforums->vars['board_url']); $forum_url = str_replace(":","\:",$forum_url); $forum_url = str_replace(".","\.",$forum_url); $s_search = array("'(\?|\&|\&)s=[0-9a-zA-Z]{32}(?:\&|\&)'i", "'(?:\&|\&)s=[0-9a-zA-Z]{32}'i", "'\?s=[0-9a-zA-Z]{32}'i"); $s_replace = array("\\1", "", ""); $search = array("'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=idx(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=idx([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=home(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=home([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=portal(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=portal([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showforum=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showforum=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=SF(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=SF(?:\&|\&)f=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})(?:\&|\&)hl=([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})(?:\&|\&)hl=([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showtopic=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?(?:\&|\&)*?act=ST(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?(?:\&|\&)*?act=ST(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})(?:\&|\&)st=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?(?:\&|\&)*?act=ST(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?(?:\&|\&)*?act=ST(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=SC(?:\&|\&)c=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=SC(?:\&|\&)c=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?c=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?c=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=Print(?:\&|\&)client=printer(?:\&|\&)f=([0-9]{1,5})(?:\&|\&)t=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showuser=([0-9]{1,5})(?:\&|\&)(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?showuser=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?(?:\&|\&)*?act=Profile(?:\&|\&)CODE=03(?:\&|\&)MID=([0-9]{1,5})([\"\'])'i", "'".$forum_url."\/index\.php\?s=([\"\'])'i", "'".$forum_url."\/index\.php(\?)([\"\'])'i", "'".$forum_url."\/index\.php\?(?:s=(?:\&|\&))*?act=(\S*?)([\"\'])'i", "'".$forum_url."\/index\.php\?(\S*?)([\"\'])'i"); $replace = array($ibforums->vars['board_url']."/main.html?\\1\\2", $ibforums->vars['board_url']."/main.html\\1", $ibforums->vars['board_url']."/index.html?\\1\\2", $ibforums->vars['board_url']."/index.html\\1", $ibforums->vars['board_url']."/index.html?\\1\\2", $ibforums->vars['board_url']."/index.html\\1", $ibforums->vars['board_url']."/forum\\1.html?\\2\\3", $ibforums->vars['board_url']."/forum\\1.html\\2", $ibforums->vars['board_url']."/forum\\1.html?\\2\\3", $ibforums->vars['board_url']."/forum\\1.html\\2", $ibforums->vars['board_url']."/topic\\1s\\2.html\\3", $ibforums->vars['board_url']."/topic\\1s\\2.html?\\3\\4", $ibforums->vars['board_url']."/topic\\1s\\2.html\\3", $ibforums->vars['board_url']."/topic\\1.html\\2", $ibforums->vars['board_url']."/topic\\1.html?\\2\\3", $ibforums->vars['board_url']."/topic\\1.html\\2", $ibforums->vars['board_url']."/topic\\2s\\3.html?\\4\\5", $ibforums->vars['board_url']."/topic\\2s\\3.html\\4", $ibforums->vars['board_url']."/topic\\2.html?\\3\\4", $ibforums->vars['board_url']."/topic\\2.html\\3", $ibforums->vars['board_url']."/cat\\1.html?\\2\\3", $ibforums->vars['board_url']."/cat\\1.html\\2", $ibforums->vars['board_url']."/cat\\1.html?\\2\\3", $ibforums->vars['board_url']."/cat\\1.html\\2", $ibforums->vars['board_url']."/ptopic\\2.html\\3", $ibforums->vars['board_url']."/user\\1.html?\\2\\3", $ibforums->vars['board_url']."/user\\1.html\\2", $ibforums->vars['board_url']."/user\\1.html\\2", $ibforums->vars['board_url']."/index.html\\1", $ibforums->vars['board_url']."/index.html\\1\\2", $ibforums->vars['board_url']."/ipb.html?act=\\1\\2", $ibforums->vars['board_url']."/ipb.html?\\1\\2"); $buffer = preg_replace($s_search,$s_replace,$buffer); $buffer = preg_replace($search,$replace,$buffer); } return $buffer; } // ----------------------------- // Найти: // ----------------------------- print $ibforums->skin['_wrapper']; // ----------------------------- // Вставить выше: // ----------------------------- $ibforums->skin['_wrapper'] = $this->do_php_to_html($ibforums->skin['_wrapper']); // ----------------------------- // Найти: // ----------------------------- echo ($htm); exit; // ----------------------------- // Вставить выше: // ----------------------------- $htm = $this->do_php_to_html($htm); // ----------------------------- // Найти: // ----------------------------- echo ($html); exit; // ----------------------------- // Вставить выше: // ----------------------------- $html = $this->do_php_to_html($html); // ----------------------------------------------------------------------------- // В файле sources/misc/print_page.php // ----------------------------------------------------------------------------- // Найти: // ----------------------------- return $posts_html; // ----------------------------- // Вставить выше: // ----------------------------- $posts_html = $print->do_php_to_html($posts_html); // ----------------------------- // В MySQL выполнить запрос: // ВНИМАНИЕ! Заменить ibf_ на ваш префикс // ----------------------------- INSERT INTO `ibf_conf_settings` ( `conf_title` , `conf_description` , `conf_group` , `conf_type` , `conf_key` , `conf_value` , `conf_default` , `conf_extra` , `conf_evalphp` , `conf_protected` , `conf_position` , `conf_start_group` , `conf_end_group` , `conf_help_key` , `conf_add_cache` ) VALUES ( 'Enable PHP to HTML conversion ?', 'Before enable this features you must right set .htaccess file.', '1', 'yes_no', 'php_to_html', '', '0', '', '', '1', '127', 'Converter Settings', '1', '0', '1' ); // ----------------------------- // Создать в корне форума файл .htaccess: // ----------------------------- RewriteEngine On RewriteRule ^index.htm index.php?%{QUERY_STRING} RewriteRule ^index.html index.php?%{QUERY_STRING} RewriteRule ^main.html index.php?act=idx&%{QUERY_STRING} RewriteRule ^ipb.html index.php?%{QUERY_STRING} RewriteRule ^topic([0-9]+)\.html$ index.php?showtopic=$1&%{QUERY_STRING} RewriteRule ^topic([0-9]+)s([0-9]+)\.html$ index.php?showtopic=$1&st=$2&%{QUERY_STRING} RewriteRule ^forum([0-9]+)\.html$ index.php?showforum=$1&%{QUERY_STRING} RewriteRule ^cat([0-9]+)\.html$ index.php?act=SC&c=$1&%{QUERY_STRING} RewriteRule ^ptopic([0-9]+)\.html$ index.php?act=Print&client=printer&f=1&t=$1&%{QUERY_STRING} RewriteRule ^user([0-9]+)\.html$ index.php?showuser=$1&%{QUERY_STRING} // ----------------------------- // Включить конвертор в панели администрирования: // ----------------------------- System Settings -> General Configuration -> Converter Settings -> Enable PHP to HTML conversion ? // ----------------------------- // Для запрета индексации "ненужной" части форума добавить в robots.txt // ----------------------------- User-Agent: * Disallow: /ipb создаю тему должноhttp://forum.ru/topic100028.html а создаетсяhttp://forum.ru/topic10002.html8 при это по динамическому адресу все нормуль.http://forum.ru/index.php?showtopic=100028http://forum.ru/index.html?showtopic=100028 Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 Sannis Опубликовано 11 Февраля 2010 Жалоба Поделиться Опубликовано 11 Февраля 2010 В инструкции есть много фрагментов вида[0-9]{1,5}Их нужно найти и заменить на[0-9]{1,10}или лучше[0-9]+ Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
0 Unico Опубликовано 11 Февраля 2010 Автор Жалоба Поделиться Опубликовано 11 Февраля 2010 фенкс, надо б внести фикс в модификацию... ) Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
Вопрос
Unico
Обсуждалось ли это где?
не нашел...
глюк у меня нарисовался при создании новых тем...
связано с тем, что появились 100 000 темы
сами темы создаются и доступны через динамические адреса...
но должна была создаться тема
http://example.com/forum/topic100022.html
а создалась такая вот... и соотвественно нот фаунд.
404 ошибка.
http://example.com/forum/topic10002.html2
правила в хтакцесс такие...
RewriteEngine On
RewriteRule ^index.htm index.php?%{QUERY_STRING}
RewriteRule ^index.html index.php?%{QUERY_STRING}
RewriteRule ^main.html index.php?act=idx&%{QUERY_STRING}
RewriteRule ^forum([0-9]+)\.html$ index.php?showforum=$1&%{QUERY_STRING}
RewriteRule ^topic([0-9]+)\.html$ index.php?showtopic=$1&%{QUERY_STRING}
RewriteRule ^topic([0-9]+)\.html&st=([0-9]+)$ index.php?showtopic=$1&st=$2&%{QUERY_STRING}
RewriteRule ^topic([0-9]+)s([0-9]+)\.html$ index.php?showtopic=$1&st=$2&%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.html$ index.php?act=SC&c=$1&%{QUERY_STRING}
насколько помню, вносились соответствующие корректировки и в пхп-файлы.
помогите, срочно плиз ))
Ссылка на комментарий
Поделиться на других сайтах
4 ответа на этот вопрос
Рекомендуемые сообщения
Присоединиться к обсуждению
Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.