Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The following is written in the upper code:
0. Base url - slash
1. If the URL is index.php - do not touch and process as is
2. If there is no such file as required in the URL and there is no such directory, then leave the address as it is, but give the user an index.php file
The code below says
1. If the URL is entirely equal to app in any case and the user agent is iPhone - send to Appstor
2. If the URL is entirely equal to app in any case and the user agent is android - send to GoogleMarket
3 If the URL is entirely app in lower case, redirect it to the new host
The first code sends the route calculation to wordpress
The second code sends devices to the cloud, and wordpress does not process at all.
When they are together:
1. In the second code, there is not enough [R] for these to be redirects, although the Host seems to do the redirect anyway
2. If you put the wordpress code on top, then the URL will never be app, because by the time the parsing reaches the point of redirecting to appstores - the url will already be index.php, not /app - move the wordpress code down
3. Also, do not forget that htaccess works in a circle. When the rule ends with the letter [L] or the end of the document is reached, xtacess runs through all the rules again to make sure that no more rules match what happened. And only if not a single rule has worked, the result is given, otherwise the process is repeated and again another circle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question