вопрос
Здравствуйте, помогите пожалуйста изменить адрес новостей с site.ru/1875-imya-novosti.html на site.ru/1875.html. Заранее спасибо.
Это мануал (как то делал, был заказ) по смене местами id alt_name = и = alt_name id
Исходя из этого мануала можно понять что и где править
Исходя из этого мануала можно понять что и где править
#####################
//.htaccess
#####################
//*********************
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$4&news_page=$2&cstart=$3&seourl=$5&seocat=$1 [L]
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$3&news_page=$2&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html$ engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/([0-9]+)-(.*).html$ index.php?newsid=$2&seourl=$3&seocat=$1 [L]
RewriteRule ^page,([0-9]+),([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$3&news_page=$1&cstart=$2&seourl=$4 [L]
RewriteRule ^page,([0-9]+),([0-9]+)-(.*).html$ index.php?newsid=$2&news_page=$1&seourl=$3 [L]
RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*).html$ engine/print.php?news_page=$1&newsid=$2&seourl=$3 [L]
RewriteRule ^([0-9]+)-(.*).html$ index.php?newsid=$1&seourl=$2 [L]
//<====>
RewriteRule ^([^.]+)/page,([0-9]+),([0-9]+),(.*)-([0-9]+).html$ index.php?seourl=$4&news_page=$2&cstart=$3&newsid=$5&seocat=$1 [L]
RewriteRule ^([^.]+)/page,([0-9]+),(.*)-([0-9]+).html$ index.php?seourl=$3&news_page=$2&newsid=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/print:page,([0-9]+),([0-9]+)-(.*).html$ engine/print.php?news_page=$2&newsid=$3&seourl=$4&seocat=$1 [L]
RewriteRule ^([^.]+)/(.*)-([0-9]+).html$ index.php?seourl=$2&newsid=$3&seocat=$1 [L]
RewriteRule ^page,([0-9]+),([0-9]+),(.*)-([0-9]+).html$ index.php?seourl=$3&news_page=$1&cstart=$2&newsid=$4 [L]
RewriteRule ^page,([0-9]+),(.*)-([0-9]+).html$ index.php?seourl=$2&news_page=$1&newsid=$3 [L]
RewriteRule ^print:page,([0-9]+),([0-9]+)-(.*).html$ engine/print.php?news_page=$1&newsid=$2&seourl=$3 [L]
RewriteRule ^(.*)-([0-9]+).html$ index.php?seourl=$1&newsid=$2 [L]
//*********************
#####################
//\engine\modules\show.short.php
#####################
//********************* строка 357
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['alt_name'] . "-" . $row['id'] . ".html";
//********************* строка 361
$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['id'] . ".html";
//*********************
#####################
//\engine\modules\topnews.php
#####################
//********************* строка 82
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['alt_name'] . "-" . $row['id'] . ".html";
//********************* строка 86
$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['id'] . ".html";
//*********************
#####################
//\engine\modules\addcomments.php
#####################
//********************* строка 428
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['alt_name'] . "-" . $row['id'] . ".html";
//********************* строка 432
$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['id'] . ".html";
//*********************
#####################
//\engine\modules\show.full.php
#####################
//********************* строка 161
$full_link = $config['http_home_url'] . $c_url . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $c_url . "/" . $row['alt_name'] . "-" . $row['id'] . ".html";
//********************* строка 195
$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['id'] . ".html";
//********************* строка 876
$rel_full_link = $config['http_home_url'] . get_url( $related['category'] ) . "/" . $related['id'] . "-" . $related['alt_name'] . ".html";
//<====>
$rel_full_link = $config['http_home_url'] . get_url( $related['category'] ) . "/" . $related['alt_name'] . "-" . $related['id'] . ".html";
//********************* строка 880
$rel_full_link = $config['http_home_url'] . $related['id'] . "-" . $related['alt_name'] . ".html";
//<====>
$rel_full_link = $config['http_home_url'] . $related['alt_name'] . "-" . $related['id'] . ".html";
//*********************
#####################
//\engine\modules\show.custom.php
#####################
//********************* строка 293
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['alt_name'] . "-" . $row['id'] . ".html";
//********************* строка 297
$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['id'] . ".html";
//*********************
#####################
//\engine\inc\editnews.php
#####################
//********************* строка 199
$full_link = $config['http_home_url'] . get_url( intval( $row['category'] ) ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( intval( $row['category'] ) ) . "/" . $row['alt_name'] . "-" . $row['id'] . ".html";
//********************* строка 203
$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['id'] . ".html";
//*********************
#####################
//\engine\inc\complaint.php
#####################
//********************* строка 295
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//********************* строка 299
$full_link = $config['http_home_url'] . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//********************* строка 463
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//********************* строка 467
$full_link = $config['http_home_url'] . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//*********************
#####################
//\engine\inc\comments.php
#####################
//********************* строка 124
$full_link = $config['http_home_url'] . get_url( intval( $row['category'] ) ) . "/" . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( intval( $row['category'] ) ) . "/" . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//********************* строка 128
$full_link = $config['http_home_url'] . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//*********************
#####################
//\engine\inc\cmoderation.php
#####################
//********************* строка 103
$full_link = $config['http_home_url'] . get_url( intval( $row['category'] ) ) . "/" . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( intval( $row['category'] ) ) . "/" . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//********************* строка 107
$full_link = $config['http_home_url'] . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//*********************
#####################
//\engine\ajax\search.php
#####################
//********************* строка 115
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['alt_name'] . "-" . $row['id'] . ".html";
//********************* строка 119
$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['id'] . ".html";
//*********************
#####################
//\engine\ajax\find_relates.php
#####################
//********************* строка 123
$full_link = $config['http_home_url'] . get_url( $related['category'] ) . "/" . $related['id'] . "-" . $related['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $related['category'] ) . "/" . $related['alt_name'] . "-" . $related['id'] . ".html";
//********************* строка 127
$full_link = $config['http_home_url'] . $related['id'] . "-" . $related['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $related['alt_name'] . "-" . $related['id'] . ".html";
//*********************
#####################
//\engine\classes\comments.class.php
#####################
//********************* строка 230
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//********************* строка 234
$full_link = $config['http_home_url'] . $row['post_id'] . "-" . $row['alt_name'] . ".html";
//<====>
$full_link = $config['http_home_url'] . $row['alt_name'] . "-" . $row['post_id'] . ".html";
//*********************