diff --git a/configs/nginx.conf b/configs/nginx.conf index e64b0bb..87a1f79 100644 --- a/configs/nginx.conf +++ b/configs/nginx.conf @@ -5,16 +5,6 @@ location ~ ^/Themes/[^/]+/Assets/ { } } -location /robots.txt { - # Allow access to the robots.txt file - try_files $uri =204; -} - -location /sitemap.xml { - # Allow access to the sitemap.xml file - try_files $uri =204; -} - location / { try_files $uri $uri/ /index.php?$args; } diff --git a/src/.htaccess b/src/.htaccess index 470f73e..d48a70a 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -5,7 +5,4 @@ CGIPassAuth On RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^Themes/[^/]+/Assets/.+$ - [L] -# Allow access to the robots.txt file -RewriteRule ^robots\.txt$ - [L] - RewriteRule ^(.+)$ index.php [L,QSA] diff --git a/src/Plugins/Robotstxt/RobotstxtPlugin.php b/src/Plugins/Robotstxt/RobotstxtPlugin.php new file mode 100644 index 0000000..2bb95f7 --- /dev/null +++ b/src/Plugins/Robotstxt/RobotstxtPlugin.php @@ -0,0 +1,25 @@ +