TCMS Реврайты не работают
Posted: Thu Dec 06, 2018 11:00 am
Приветствую, такая вот проблема, установили мне админы tcms, реврайты вот эти
server {
....
location /scj/scj2.lic {
return 404;
}
location / {
.....
if (!-e $request_filename) {
rewrite "^/([^/]{2})/(.*)$" /$2?force_lng=$1&$query_string ;
}
}
location /gallery {
rewrite ^/gallery/([^/]+)/index.html$ /script_folder_name/cgi/out.php?url=content&slug=$1&$query_string ;
rewrite "^/gallery/([^/]+)/([0-9]{1,2}).html$" /script_folder_name/cgi/out.php?url=content&slug=$1&item_id=$2&$query_string ;
}
location /category {
rewrite ^/category/([^/]+)/$ /script_folder_name/cgi/out.php?url=content&p=100&dont_count_in_trade=true&skip_sell=true&group_name=$1&order=ctr&$query_string ;
rewrite ^/category/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/cgi/out.php?url=content&p=100&dont_count_in_trade=true&skip_sell=true&group_name=$1&order=$2&page=$3&$query_string ;
}
location /tag {
rewrite ^/tag/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?tag=$1&page=$3&order=$2&$query_string ;
rewrite ^/tag/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?tag=$1&page=$2&$query_string ;
rewrite ^/tag/([^/]+)/$ /script_folder_name/tube/index.php?tag=$1&$query_string ;
}
location /model_galleries {
rewrite ^/model_galleries/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&force_template=model_galleries ;
rewrite ^/model_galleries/([^/]+)/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&page=$2&force_template=model_galleries ;
}
location /model {
rewrite ^/model/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&force_template=model_galleries&$query_string ;
rewrite ^/model/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&force_template=model_galleries&order=$2&page=$3&$query_string ;
}
location /search {
rewrite ^/search/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?search=$1&page=$2&$query_string;
rewrite ^/search/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?search=$1&order=$2&page=$3&$query_string;
}
естественно с заменой script_folder_name, в темпэйте стоит <a href="<?=$url_lng_prefix?>/category/<!--CATEGORY_ID-->/<!--CATEGORY_CUSTOM_NAME-->/" title="<!--CATEGORY_NAME--> Videos" rot_id="<!--THUMB_LINK-->">
А всеравно при клике на категорию получаю 404 от nginx.
server {
....
location /scj/scj2.lic {
return 404;
}
location / {
.....
if (!-e $request_filename) {
rewrite "^/([^/]{2})/(.*)$" /$2?force_lng=$1&$query_string ;
}
}
location /gallery {
rewrite ^/gallery/([^/]+)/index.html$ /script_folder_name/cgi/out.php?url=content&slug=$1&$query_string ;
rewrite "^/gallery/([^/]+)/([0-9]{1,2}).html$" /script_folder_name/cgi/out.php?url=content&slug=$1&item_id=$2&$query_string ;
}
location /category {
rewrite ^/category/([^/]+)/$ /script_folder_name/cgi/out.php?url=content&p=100&dont_count_in_trade=true&skip_sell=true&group_name=$1&order=ctr&$query_string ;
rewrite ^/category/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/cgi/out.php?url=content&p=100&dont_count_in_trade=true&skip_sell=true&group_name=$1&order=$2&page=$3&$query_string ;
}
location /tag {
rewrite ^/tag/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?tag=$1&page=$3&order=$2&$query_string ;
rewrite ^/tag/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?tag=$1&page=$2&$query_string ;
rewrite ^/tag/([^/]+)/$ /script_folder_name/tube/index.php?tag=$1&$query_string ;
}
location /model_galleries {
rewrite ^/model_galleries/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&force_template=model_galleries ;
rewrite ^/model_galleries/([^/]+)/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&page=$2&force_template=model_galleries ;
}
location /model {
rewrite ^/model/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&force_template=model_galleries&$query_string ;
rewrite ^/model/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&force_template=model_galleries&order=$2&page=$3&$query_string ;
}
location /search {
rewrite ^/search/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?search=$1&page=$2&$query_string;
rewrite ^/search/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?search=$1&order=$2&page=$3&$query_string;
}
естественно с заменой script_folder_name, в темпэйте стоит <a href="<?=$url_lng_prefix?>/category/<!--CATEGORY_ID-->/<!--CATEGORY_CUSTOM_NAME-->/" title="<!--CATEGORY_NAME--> Videos" rot_id="<!--THUMB_LINK-->">
А всеравно при клике на категорию получаю 404 от nginx.