Good day to all! I know that the topic is already haunted, but anyway there was a problem: I am trying to set up the CNC, it is necessary that the contents of the site.ru/articles.html?site=sit.ru&url=url page be displayed at site.ru/articles/url. I do this:

RewriteEngine On RewriteRule ^articles/([-a-zA-Z0-9_]+)? articles.html?site=site.ru&url=$1 [L] 

But when I go to site.ru/articles/url, I redirect to site.ru/articles.html?site=sit.ru&url=url, but I need the address to remain.

Tell me how to solve the issue? Thanks in advance!

  • I copied your code - everything works fine for me. Probably, the problem is either in other rules in this file, or in other .htaccess files, for example, in the articles folder (if there is one). - Im ieee

1 answer 1

Try this

 RewriteRule ^articles/([-a-zA-Z0-9_]+)? articles.html?site=site.ru&url=$1 [L,QSA]