M
M
Mikhail Mirgorodsky2020-02-27 12:49:11
htaccess
Mikhail Mirgorodsky, 2020-02-27 12:49:11

How to configure access to the htaccess file?

Good afternoon,
In my xtats settings, I have a redirect to the folder,
/components/ ,
but it contains the file I need, /components/com_mycityselector/robots.txt.php The
question is, how can I make the robots.txt.php file be available via link?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dodo512, 2020-02-27
@PiZZaDoXa

##Блокировка прямого доступа к ядру - начало
RewriteCond %{REQUEST_FILENAME} -f

Add a line here
RewriteCond %{REQUEST_URI} !=/components/com_mycityselector/robots.txt.php

M
Mikhail Mirgorodsky, 2020-02-27
@PiZZaDoXa

I am using this:

##Блокировка прямого доступа к ядру - начало
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} \.php|\.ini|\.xml [NC]
RewriteCond %{REQUEST_URI} \/components\/ [OR]
RewriteCond %{REQUEST_URI} ^\/includes\/|^\/administrator\/includes\/ [OR]
RewriteCond %{REQUEST_URI} \/language\/ [OR]
RewriteCond %{REQUEST_URI} \/libraries\/ [OR]
RewriteCond %{REQUEST_URI} \/modules\/ [OR]
RewriteCond %{REQUEST_URI} \/plugins\/ [OR]
RewriteCond %{REQUEST_URI} \/templates\/ [OR]
RewriteCond %{REQUEST_URI} \/cli\/
RewriteRule ^(.*)$ index.php [R=404,L]
##Блокировка прямого доступа к ядру - конец

And that's the line that
RewriteCond %{REQUEST_URI} \/components\/ [OR]
gets in the way.
What does the rule look like?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question