What is the url with the get request:

https://xxx.ru/page/?page=update-1/ 

Via .htaccess make display as:

 https://xxx.ru/page/update-1/ 
  • Google pretty url, but you can not hide the request, it is processed on the server side - strangeqargo
  • I always have problems understanding such issues. The user should type and see https://xxx.ru/page/update-1/ ? - splash58 7:57 pm
  • @ splash58, Yes, that is, the user follows the link https://xxx.ru/page/update-1/ and the server accepts it as https://xxx.ru/page/?page=update-1 Or the user is simple follows the link https://xxx.ru/page/?page=update-1/ and in the address bar you see https://xxx.ru/page/update-1/ - Sauron
  • the second looks impossible. According to the first option, Viktor Yevlampyev’s answer should work. Why does not work, it is not clear. do you have anything else in htaccess? - splash58 8:31 pm
  • I even tried to clear everything. And to put only its code everything is exactly the same. - Sauron

2 answers 2

 RewriteBase / RewriteEngine on RewriteRule ^page\/(.*?)/?$ page/?page=$1 [L,QSA] 

Those. the user writes xxx.ru/page/update-1/, and the server sees this as xxx.ru/page/?page=update-1/

  • I tried it, everything seems to be worth it too, and there is no change. - Sauron
  • @Sauron, Perhaps it is worth adding Options -Indexes - Victor Evlampiev 8:17 pm
  • It also did not help. - Sauron

Generator. Htaccess helped. http://www.generateit.net/mod-rewrite/index.php

Well, if you get an error 500, add the code:

 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l