How to make the opening of http://www.site.ru/flowers%2Flilac redirect to http://www.site.ru/flowers/lilac ?
- Yandex Direct requires - Ilya Suprun
- you need to somehow redirect in .htaccess as flowers and lilac are parameters (there may be keys) - Ilya Suprun
- Read the answers here at stackoverflow.com/q/4390436/5441700 and here at stackoverflow.com/q/25745832/5441700 - Visman
|
2 answers
Can be done through .htaccess . For example, with the Redirect command:
Redirect 301 /old/old.htm http://www.you.ru/new.htm Or via mod_rewrite directives:
RewriteRule ^cat/oldpage.* /newpage.html [R=301,L] You can read more in this article .
Only you need to take into account that the redirect implies certain server response codes and their influence in terms of SEO.
|
Try thisheader(' http://www.site.ru/flowers/lilac');
Good luck
- you need to somehow .htaccess redirect as flowers and lilac are options - Ilya Suprun
- But through php, you can also, just check the parameters and generate a string. I do not recommend using .htaccess - a strange thing in some places dangerous + some hosting companies prohibit changing this file - Mikola Mrchuk
- This option does not fit - Ilya Suprun
|