Current position: home page > Website Design >How to prevent search engines from fetching calendar URLs in emlog templates

How to prevent search engines from fetching calendar URLs in emlog templates

Author: blueleaf Classification: Website Design Time: December 27, 2023 Browse: 422

When viewing the data collected by the search engine, it is found that Emlog template 's calendar website will be included, such as http://yourdomain/?action=cal&record=1000000 It is useless to include such websites in the calendar website. If more websites are included, the weight will be reduced. It is considered as junk content Emlog template In order to prevent search engines from crawling calendar URLs, Blueleaf lists two simple methods.

 How to prevent search engines from fetching calendar URLs in emlog template.png

emlog Template A simple way to prevent search engines from grabbing calendar URLs:

1. Modify the robots.txt file in the root directory and add Disallow: ?action=cal You can disable the search engine to capture and include.

2. Using Php code , found under the current emlog template folder plugins. php If there is no file, create a new one. Copy the following code to plugins.php The calendar will not be available using this method in the file.

 $action = isset($_GET['action']) ?  addslashes(trim($_GET['action'])) : ''; if($action=='cal'){ header("HTTP/1.1 404 Not Found"); header("Status: 404 Not Found"); exit; }

Disclaimer:

Website: Click Copy to share with friends!

All content resources shared by this website, if not noted, are original by Blueleaf. If you need to reprint, please indicate the source; Please contact us in case of infringement Contact handling Please understand!

Comment List
 blink the eyes kiss Growl happy think poor It's embarrassing Grievance ha-ha hush Right hum Zuo Hum Hum doubt A bad laugh Make money Sadness Be cool Seduce fierce handshake yeah Hee hee Shyness applause greedy Madness Embrace gather and watch Mighty awesome
Submit comments

Clear information
Close Comment
music appreciation
Back to top