E
E
evgenhitsan2020-11-12 17:37:01
Computers
evgenhitsan, 2020-11-12 17:37:01

How to write a redirect from a subdirectory to a directory using htaccess?

There is a page " my-tests3.pp.ua/markizy-pod-zakaz/amp ", but I noticed that all pages with the names " my-tests3.pp.ua/markizy-pod-zakaz/amp/1 " and in general " http://my-tests3.pp.ua/markizy-pod-zakaz/amp/all-h... " displays the same page.

The question is simple - how to write a redirect from any page after " my-tests3.pp.ua/markizy-pod-zakaz/amp " to the same page. To get something like this:
my-tests3.pp.ua/markizy-pod-zakaz/amp - does not redirect
my-tests3.pp.ua/markizy-pod-zakaz/amp/1 - redirects to my-tests3.pp. ua/markizy-pod-zakaz/amp
my-tests3.pp.ua/markizy-pod-zakaz/amp/adfsdf - redirect tomy-tests3.pp.ua/markizy-pod-zakaz/amp
my-tests3.pp.ua/amp/1 - redirects to my-tests3.pp.ua/amp
my-tests3.pp.ua/amp/sdcfsdf - redirect to my-tests3.pp.ua/amp

Answer the question

In order to leave comments, you need to log in

6 answer(s)
4
4Proof, 2016-08-01
@4Proof

Try to turn on the "blue" monitor and press win + P in order to expand the desktop on it

R
Ruslan Ganeev, 2016-08-01
@GaneevRR

DVI->D-Sub adapter required

A
AntHTML, 2016-08-01
@anthtml

Write the model of the video card and / or clearly photograph all the connectors on it.

V
Vadim Kozonogov, 2016-08-01
@platon23

At the extreme, you can try to change white and blue

A
andreyNN, 2016-08-01
@andreyNN

when using a discrete video card, the built-in one is far from always turned off, it depends on the release date of the computer, BIOS settings and drivers. theoretically can work in this configuration.

D
dodo512, 2020-11-12
@evgenhitsan

Add to the beginning of the .htaccess file
RewriteRule ^((.+/)?amp/).+$ /$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question