http://site.ua/page,1,post.html
http://site.ua/page,2,post.html
http://site.ua/page,2,post.html
на
http://site.ua/1_static.html
http://site.ua/2_static.html
Не рекомендуется использывать формат
1. открываем engine/modules/static.php
ищем:
меняем на:
2. Открываем .htaccess
находим:
меняем на:
http://site.ua/1-static.html
так как етот формат используется для вывода полных новостей!!!1. открываем engine/modules/static.php
ищем:
if ($news_page < $anzahl_seiten)
{
$pages = $news_page + 1;
if ($config['allow_alt_url'] == "yes"){
$nextpage = " | <a href="".$config['http_home_url']."page,".$pages.",".$static_result['name'].".html">".$lang['news_next']."</a>";
} else {
$nextpage = " | <a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=".$pages."">".$lang['news_next']."</a>";
}
}
if ($news_page > 1)
{
$pages = $news_page -1;
if ($config['allow_alt_url'] == "yes"){
$prevpage = "<a href="".$config['http_home_url']."page,".$pages.",".$static_result['name'].".html">".$lang['news_prev']."</a> | ";
} else {
$prevpage = "<a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=".$pages."">".$lang['news_prev']."</a> | ";
}
}
$tpl->set('{pages}', $prevpage.$lang['news_site']." ".$news_page.$lang['news_iz'].$anzahl_seiten.$nextpage);
if ($config['allow_alt_url'] == "yes"){
$replacepage = "<a href="".$config['http_home_url']."page,"."1".",".$static_result['name'].".html">2</a>";
} else {
$replacepage = "<a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=1">2</a>";
}
{
$pages = $news_page + 1;
if ($config['allow_alt_url'] == "yes"){
$nextpage = " | <a href="".$config['http_home_url']."page,".$pages.",".$static_result['name'].".html">".$lang['news_next']."</a>";
} else {
$nextpage = " | <a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=".$pages."">".$lang['news_next']."</a>";
}
}
if ($news_page > 1)
{
$pages = $news_page -1;
if ($config['allow_alt_url'] == "yes"){
$prevpage = "<a href="".$config['http_home_url']."page,".$pages.",".$static_result['name'].".html">".$lang['news_prev']."</a> | ";
} else {
$prevpage = "<a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=".$pages."">".$lang['news_prev']."</a> | ";
}
}
$tpl->set('{pages}', $prevpage.$lang['news_site']." ".$news_page.$lang['news_iz'].$anzahl_seiten.$nextpage);
if ($config['allow_alt_url'] == "yes"){
$replacepage = "<a href="".$config['http_home_url']."page,"."1".",".$static_result['name'].".html">2</a>";
} else {
$replacepage = "<a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=1">2</a>";
}
меняем на:
if ($news_page < $anzahl_seiten)
{
$pages = $news_page + 1;
if ($config['allow_alt_url'] == "yes"){
$nextpage = " | <a href="".$config['http_home_url'].$pages."_".$static_result['name'].".html">".$lang['news_next']."</a>";
} else {
$nextpage = " | <a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=".$pages."">".$lang['news_next']."</a>";
}
}
if ($news_page > 1)
{
$pages = $news_page -1;
if ($config['allow_alt_url'] == "yes"){
$prevpage = "<a href="".$config['http_home_url'].$pages."_".$static_result['name'].".html">".$lang['news_prev']."</a> | ";
} else {
$prevpage = "<a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=".$pages."">".$lang['news_prev']."</a> | ";
}
}
$tpl->set('{pages}', $prevpage.$lang['news_site']." ".$news_page.$lang['news_iz'].$anzahl_seiten.$nextpage);
if ($config['allow_alt_url'] == "yes"){
$replacepage = "<a href="".$config['http_home_url']."1"."_".$static_result['name'].".html">2</a>";
} else {
$replacepage = "<a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=1">2</a>";
}
{
$pages = $news_page + 1;
if ($config['allow_alt_url'] == "yes"){
$nextpage = " | <a href="".$config['http_home_url'].$pages."_".$static_result['name'].".html">".$lang['news_next']."</a>";
} else {
$nextpage = " | <a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=".$pages."">".$lang['news_next']."</a>";
}
}
if ($news_page > 1)
{
$pages = $news_page -1;
if ($config['allow_alt_url'] == "yes"){
$prevpage = "<a href="".$config['http_home_url'].$pages."_".$static_result['name'].".html">".$lang['news_prev']."</a> | ";
} else {
$prevpage = "<a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=".$pages."">".$lang['news_prev']."</a> | ";
}
}
$tpl->set('{pages}', $prevpage.$lang['news_site']." ".$news_page.$lang['news_iz'].$anzahl_seiten.$nextpage);
if ($config['allow_alt_url'] == "yes"){
$replacepage = "<a href="".$config['http_home_url']."1"."_".$static_result['name'].".html">2</a>";
} else {
$replacepage = "<a href="$PHP_SELF?do=static&page=".$static_result['name']."&news_page=1">2</a>";
}
2. Открываем .htaccess
находим:
RewriteRule ^page,([0-9]+),([^/]+).html$ index.php?do=static&page=$2&news_page=$1 [L]
меняем на:
RewriteRule ^([0-9]+)_([^/]+).html$ index.php?do=static&page=$2&news_page=$1 [L]