A
A
Alexey2020-08-01 01:02:12
htaccess
Alexey, 2020-08-01 01:02:12

The site does not work according to the main htaccess rule if the line after the domain repeats the name of the folder on the hosting?

htaccess code

#Убираем слеш / в конце строки
RewriteRule (.+)/$ /$1 [L,R=301]
#все отправляет на index
RewriteRule ^.*$ index.php [L]

by typing for example:
mydomain.com/page

opens index.php and everything is fine, but the programming folder is on the hosting, and as soon as I type:
mydomain.com/programming

in the browser line becomes:
mydomain.com/programming/

i.e. the last slash remains
on the page
"Page not available Mydomen.com redirected too many times. Please delete your cookies.. ERR_TOO_MANY_REDIRECTS"

how to make him not pay attention that there is such a folder, thanks in advance?

perhaps you need to add your htaccess in that folder? and what should be written in it then?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2020-08-01
@olololollloo

This mod_dir fixes the address for existing folders.
Disabled using If you need to disable only for /programming/, then add it to the /programming/.htaccess file, and if for all folders, then to the file at the root of the site. DirectorySlash Off

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question