mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-06 04:30:21 +00:00
Change to robots.txt template
This commit is contained in:
parent
a3732c8f00
commit
fab74fc00a
1 changed files with 6 additions and 3 deletions
|
@ -85,12 +85,15 @@ _endmarker="### Version Information ##"
|
|||
# Create the robots.txt file
|
||||
# **************************
|
||||
|
||||
printf '%s\n%s\n%s%s\n%s%s\n%s%s\n%s\n%s\n\n%s\n%s\n%s\n' "$_startmarker" "###################################################" "### Version: " "$MY_GIT_TAG" "### Updated: " "$_now" "### Bad Bot Count: " "$BAD_BOTS" "###################################################" "$_endmarker" "User-agent: *" "Disallow: /wp-admin/" "Allow: /wp-admin/admin-ajax.php" >> "$_tmprobots"
|
||||
printf '###################################################################\n# The Ultimate robots.txt Bot and User-Agent Blocker\n# Copyright:\n# https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker\n###################################################################\n\n' >> "${_tmprobots}"
|
||||
|
||||
printf '%s\n%s\n%s%s\n%s%s\n%s%s\n%s\n%s\n\n%s\n%s\n%s\n' "$_startmarker" "###################################################" "### Version: " "$MY_GIT_TAG" "### Updated: " "$_now" "### Bad Bot Count: " "$BAD_BOTS" "###################################################" "$_endmarker" "User-agent: *" "Disallow: /wp-admin/" "Allow: /wp-admin/admin-ajax.php" >> "${_tmprobots}"
|
||||
|
||||
while IFS= read -r LINE
|
||||
do
|
||||
printf 'User-agent: %s\n%s\n' "${LINE}" "Disallow:/" >> "$_tmprobots"
|
||||
printf 'User-agent: %s\n%s\n' "${LINE}" "Disallow:/" >> "${_tmprobots}"
|
||||
done < $_output
|
||||
printf '\n' >> "$_tmprobots"
|
||||
printf '\n' >> "${_tmprobots}"
|
||||
sudo cp $_tmprobots $TRAVIS_BUILD_DIR/robots.txt/robots.txt
|
||||
exit 0
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue