Answer the question
In order to leave comments, you need to log in
How to create a rule in .htaccess for a redirect?
Good afternoon!
The task is to make a redirect from a page like " http://site.ru////xn--80sdgasdgasd.xn--p1ai/intent... " to the main page.
Redirects from pages of a simple type site.ru/request , etc. work, no problems.
Here is a combination of non-standard values in the url:
- encoded Cyrillic domain
- tick symbol
- and several slashes in a row
The browser will redirect this page to http://site.ru/xn--80asdgasdg.xn--p1ai/intentions/...
The following options don't work:
redirect 301 http://site.ru////xn--80sdgasdgasd.xn--p1ai/intent... site.ru
redirect 301 "http://site.ru////xn--80sdgasdgasd.xn--p1ai/intent... " site.ru
redirect 301 " http://site.ru/xn--80asdgasdg.xn--p1ai/ intentions/... " site.ru
RewriteRule ^(.*).xn--p1ai\/intentions\/?(.*)$ http:/site.ru$1 [R=301,L]
and similar combinations.
Prompt , please, how to make a rule for this kind of link.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question