Posts

Showing posts from October, 2023

block crawling of a page with robots.txt

create a robots.txt block thes pages, https://web-stories.in/c and https://web-stories.in/shop.php User-agent: * Disallow: /c Disallow: /shop.php This robots.txt file will block all search engines from crawling the pages  /c  and  /shop.php . As a result, these pages will not be indexed by search engines and will not appear in search results. To create a robots.txt file, you can use a text editor to create a new file named  robots.txt  and add the above code to it. Then, you can upload the file to the root directory of your website. Once the robots.txt file is in place, search engines will start crawling your website and will respect the instructions in the file. This will prevent them from crawling the pages  /c  and  /shop.php , and these pages will not be indexed by search engines.

how to set 410 for a page

create page with below content for tuny.php  <?php header ("HTTP/1.1 410 Gone"); echo "<h1>410 Gone</h1>"; echo "<p>The resource you are looking for has been deleted.</p>";

renmae xmlrpc.php from all /home/*/public_html directory

You can use the find command along with the exec action to search for all xmlrpc.php files under /home/*/public_html/ and rename them to xmlrpc.php-back . Here is the modified command: sh Copy code find /home/*/public_html/ - type f -name "xmlrpc.php" - exec mv -v {} {}-back \; Explanation: find : This command is used to search for files and directories based on a given expression. /home/*/public_html/ : This searches within the public_html directories of all users. -type f : This option ensures that find only looks for files. -name "xmlrpc.php" : This finds all files named xmlrpc.php . -exec : This option allows you to pass another command that will be executed on every file found. mv -v {} {}-back : This is the mv (move) command used to rename files. The {} symbol is a placeholder that find replaces with the current file path. So mv -v {} {}-back effectively renames each found file by appending -back to its name. The -v option makes the mv command

setup twilio for php

 <?php // Update the path below to your autoload.php, // see https://getcomposer.org/doc/01-basic-usage.md // require_once '/path/to/vendor/autoload.php'; require __DIR__ . '/vendor/autoload.php'; use Twilio\Rest\Client; // Find your Account SID and Auth Token at twilio.com/console // and set the environment variables. See http://twil.io/secure // $sid = getenv("TWILIO_ACCOUNT_SID"); // $token = getenv("TWILIO_AUTH_TOKEN"); $sid = 'AC26ab55454f2295b5bde894cb166da549'; //"AC2b9224fee92cde0d8b44102fade3083d"; // origianl from kumar $token = 'c1dd24b19f45b923635c7be681d604ff';// "5430839ca3165d10c1d5a795fb91da7a"; // origianl from kumar $twilio = new Client($sid, $token); $message = $twilio->messages                   ->create("+13143242645", // to                            [                                "body" => "This is the ship that made the Kessel Run in fourteen parsecs?&q

How to change all 404 to 410 error code in WordPress

If you want to change all 404 error of your WordPress website into 410 error statues then just add this code before the get_header(); in you 404.php template 1 2 3 4 5 <?php // Set 410 - GONE status for all 404 pages header( $_SERVER [ "SERVER_PROTOCOL" ] . " 410 Gone" ); get_header(); ?> Hope it helps. default code <?php get_header(); ?> <div id="main-content"> <div class="container"> <div id="content-area" class="clearfix"> <div id="left-area"> <article id="post-0" <?php post_class( 'et_pb_post not_found' ); ?>> <?php get_template_part( 'includes/no-results', '404' ); ?> </article> </div> <?php get_sidebar(); ?> </div> </div> </div> <?php get_footer();

to install vendor/autoload.php for php 8

 to install vendor/autoload.php after installing composer  composer dump-autoload   php artisan optimize   composer update

ofice 365 to zimbra

  Where to create and delete your app passwords You can create and delete app passwords, based on how you use two-factor verification: Your organization uses two-factor verification and the Additional security verification page. If you're using your work or school account (such as, alain@contoso.com) with two-factor verification in your organization, you can manage your app passwords from the  Additional security verification page . For detailed instructions, see "Create and delete app passwords using the Additional security verification page" in this article. Your organization uses two-factor verification and the Office 365 portal. If you're using your work or school account (such as, alain@contoso.com), two-factor verification, and Microsoft 365 apps in your organization, you can manage your app passwords from the  Office 365 portal page . For detailed instructions, see "Create and delete app passwords using the Office 365 portal" in this article. You'