Good day to all… I have a question, how to implement the following:
there is a link like
http://site.ru/news?id=[news-id]and you need to change it so that the link works at
http://site.ru/news?id=[news-id]is already done. Thank you.
Answer 1, authority 100%
Try adding the following to your routes.php file:
$route['(:num)'] = 'news?id=$1';
Where is the link to
If this doesn’t work, maybe the .htaccess file at the root of the site should contain these lines?
RewriteEngine on RewriteCond $1 !^(index\.php|robots\.txt|img|styles|demo|files|js|recommend|products|partner) RewriteRule ^(.*)$ /index.php?/$1 [L]