The site works on the basis of MySQL database, there used to be an engine and links in it were about such

.ru/index.php/option/content/task/view/id/301 .ru/index.php?option=content&task=view&id=301 

And everything worked, no matter how the link looked, it opened ID = 301, but now I changed the engine, now my site opens only links of this type

 .ru/index.php?option=content&task=view&id=185 

But there are sites that have links to my site.

 .ru/index.php/option/content/task/view/id/301 

What to do? How to get out of the situation? Or how to prescribe so that b .../content/task/... this method also worked?

    1 answer 1

    Make a replacement for the desired type of urla

     RewriteRule ^index.php/option/content/task/view/id/([0-9]+)$ /index.php?option=content&task=view&id=$1 [L] 

    Like so

    • it turned out)) but that's not the task, now if the page had the link index.php? ....... then now he sees it as index.php / option /...../ index.php? ... .. (( - meravaz
    • Is index.php needed? In the CodeIgniter framework, it is, you can remove - the URL will be more beautiful. Then links can be brought to the form / option / content / task / view / id / 123 - Dem
    • Yes, I need (. Just another moment like that for some reason when linking in this form. Index.php / option / .... site design does not load. - meravaz
    • one
      Specify everywhere in the links and addresses to images and css-files not "index.php ...", a "/index.php ...". problem with "index.php / option /...../ index.php?" will disappear and the design will be loaded - Vitaly Kustov