W
W
weranda2016-05-26 19:03:43
Programming
weranda, 2016-05-26 19:03:43

How to cancel a redirect to a page without a slash?

Hello LiteSpeed
​​Shared Hosting .htaccess htaccess is set to redirect all URLs to a URL with a trailing slash:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*[^/])$ $1/ [L,R=301]

What rule and where to add so that the desired page does not redirect to a URL with a slash?
There is a page sitemap.xmland it redirects to sitemap.xml/
PS For a
long time and often there are difficulties with understanding the rules of the htaccess file. What language are these rules written in? Are there any solid works on this subject? How many times I tried to find information, the same number of times I came across only someone's notes.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-05-26
@weranda

Add RewriteCond %{REQUEST_URI} !(\.xml)$

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question