Colleagues! Help solve the issue with the CNC on the music site.
link looks like this: site.ru/mp3/song/14/25 14 - id songs 25 - id artist
in htaccess two codes - CNC for the full version and for the mobile version of the site. The following code in htaccess:
# ЧПУ MP3-мобильная версия и редирект --РАБОЧИЙ-- RewriteRule ^mp3/song/([0-9]+)/([0-9]+)/?$ /mp3/msong.php?id=$1&artist_id=$2&norec [L] RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{QUERY_STRING} id=([0-9]+)&artist_id=([0-9]+)$ RewriteRule ^mp3/msong.php$ /mp3/song/%1/%2/? [L,R=301] # ЧПУ mp3 полная версия и редирект (--ПРОБНЫЙ--) RewriteRule ^mp3/song/([0-9]+)/([0-9]+)/?$ /mp3/song.php?id=$1&artist_id=$2&norec [L] RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteCond %{QUERY_STRING} id=([0-9]+)&artist_id=([0-9]+)$ RewriteRule ^mp3/song.php$ /mp3/song/%1/%2/? [L,R=301] the whole point in the fourth line in both pieces of code
TASK : how to make the address be given the same , but for the pages to be different (i.e. mp3 / msong.php - mobile version, and mp3 / song.php - full version), and actually different layouts were issued - separately for mob. and desktops (both layouts are ready for a long time and function successfully)? The address should be: site.ru/mp3/song/14/25 - for both versions of the site.
Now issued only for mobile devices, because A piece of code for mobiles is higher. Or you can somehow combine these lines? like: RewriteRule ^ mp3 / msong.php OR mp3 / song.php $ / mp3 / song /% 1 /% 2 /? [L, R = 301] - if such exists at all (operators OR and AND in htaccess)