N
N
NetyNicka2014-12-17 13:53:16
Zend Framework
NetyNicka, 2014-12-17 13:53:16

Ignoring robots.txt in Zend via htaccess?

There is a site on Zend. Created a robots.txt file in the root directory.
The problem is that mysite.ru/robots.txt is perceived as an invalid controller/action. A colleague suggested that you can fix the situation through htaccess, but he didn’t say exactly how.
I did not find a similar question on the Internet. Please tell me how to force the server to open the robots.txt file at the link mysite.ru/robots.txt, and not consider it as a controller.
htaccess content:

RewriteEngine On
RewriteBase /
Options +FollowSymLinks

AddDefaultCharset UTF-8

# php_value magic_quotes_gpc 0
# php_value short_open_tag 1
# php_value session.auto-start off

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
no_one_safe, 2014-12-17
@NetyNicka

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR ]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question