A
A
Alexander Kazakevich2016-06-19 10:09:05
PHP
Alexander Kazakevich, 2016-06-19 10:09:05

How to remove repeated slashes in the address bar?

The situation is non-standard. What we have:
.htaccess file:

RewriteEngine on
# убираем повторяющиеся слеши
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule (.*) %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

index.php:
<?php
phpinfo(32);

image.png
What is the problem? With an empty .htaccess, the situation does not change.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-06-19
@sim3x

Use nginx php-fpm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question