Loading
Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    WooCommerce Pre-Orders Plugin ব্যবহার গাইড

    17/09/2025

    Automation WooCommerce Orders with WhatsApp

    29/08/2025

    WC Incomplete order Recovery (Single-file WooCommerce Plugin)

    23/08/2025
    Facebook X (Twitter) Instagram YouTube LinkedIn TikTok
    Thursday, November 13
    Facebook X (Twitter) Instagram
    This is FL FaysalThis is FL Faysal
    • Home
    • Branding
    • Tuotorial
    • Freelancing
      • Fiverr
      • UP Work
    • Ethical Hacking
    • WordPress
    • Web Design
    • About Me
    This is FL FaysalThis is FL Faysal
    Home » Protect wordpress Websites With .htaccess
    Ethical Hacking

    Protect wordpress Websites With .htaccess

    Fl_FaysalBy Fl_Faysal06/04/2024No Comments4 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp VKontakte Email
    Share
    Facebook Twitter LinkedIn Pinterest

    Protect wordpress Websites With .htaccess

     

    আমাদের ওয়ার্ডপ্রেসের ওয়েবসাইটে রুট ডাইরেক্টরি এর ভিতরে অনেক সেনসিটিভ একটা ফাইলের নাম হল .htaccess.
    আমরা অনেকে ওয়ার্ডপ্রেস ওয়েবসাইট ডিজাইন করি এবং প্লাগিন নিয়ে কাজ করি কিন্তু আমাদের .htaccess ফাইলটির কথা কেউ ভাবি না অথবা অনেকেই চিনি না।

    আজকে আমরা .htaccess এর মাধ্যমে ওয়ার্ডপ্রেসের বিভিন্ন ধরনের সিকিউরিটি কিভাবে কনফার্ম করা যায় তা দেখব।
    ”

    আজকে আমরা .htaccess এর মাধ্যমে ওয়ার্ডপ্রেসের বিভিন্ন ধরনের সিকিউরিটি কিভাবে কনফার্ম করা যায় তা দেখব।

    1. Configuring the .htaccess file

    ”
    আমাদের ডিফল্ট ওয়ার্ডপ্রেসের দেওয়া .htaccess কোডগুলো নিচে দেওয়া হল। প্রথমে আমাদের কাজ ওয়েবসাইটের .htaccess ফাইল টি এডিট করে এই কোডগুলো বসিয়ে দেওয়া:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    ”

    2. Protect .htaccess
    “# Protect .HTACCESS

    <Files ~ “^.*\.([Hh][Tt][Aa])”><Files ~ “^.*\.([Hh][Tt][Aa])”>
    order allow,deny
    deny from all
    satisfy all
    </Files>”

    3. Protect wp-config.php

    ”
    আমাদের ওয়ার্ডপ্রেস ওয়েব সাইটে wp-config.php ফাইলে আমাদের ওয়েবসাইটে বিভিন্ন ইনফর্মেশন স্টোর করা থাকে। তাই এই ডাটাগুলো যাদের কেউ
    access না করতে পারে নিচের কোডগুলো বসাতে হবে:

    # WP-CONFIG BLOCK

    <Files wp-config.php>
    order allow,deny
    deny from all
    </Files>

    ”

     

    4. No directory browsing: It will block browsing directories

    ”
    আমাদের ওয়ার্ডপ্রেস ওয়েব সাইটে ডাইরেক্টরি ইনডেক্সিং যদি অফ করার না থাকে যে কেউ আমাদের ওয়েবসাইটের বিভিন্ন ফাইল থিম প্লাগিন সম্পর্কে ইনফরমেশন জেনে যাবে। তাই নিচের কোডগুলো বসাতে হবে :

    # directory browsing block
    Options All -Indexes

    ”

    ● Check directory indexing is blocked : https://hackertarget.com/wordpress-security-scan/

    5. Disable XMLRPC.PHP

    ”
    XMLRPC ডিজেবল করা না থাকলে বিভিন্ন ধরনের এসকিউএল ইনজেকশন এবং কুকি হাইজাকিং হতে পারে।

    ● Block WordPress xmlrpc.php requests
    Check your domain.com/xmlrpc.php (Its open normally for attacks)
    ”

    ”
    নিচের কোডগুলো ব্যবহার করে আমরা সহজেই XMLRPC ডিজেবল করে রাখতে পারি:

    # Disable XMLRPC.PHP

    <Files xmlrpc.php>

    order deny,allow

    deny from all

    </Files>

    ”

    6. Disable scanners in Your Website:

    ”
    বিভিন্ন স্ক্যানার আমাদের ওয়েবসাইটে বিভিন্নভাবে Vulnerability যাতে বের না করতে পারে তাই ওয়েবসাইট স্ক্যানিং ডিজেবল করার জন্য নিচের কোডগুলো ব্যবহার করতে হবে:

    # BEGIN block author scans

    RewriteEngine On

    RewriteBase /

    RewriteCond %{QUERY_STRING} (author=\d+) [NC]

    RewriteRule .* – [F]

    # END block author scans

    ”

    7. Block Suspicious IP

    ”
    যদি কোন আইপি আমাদের ওয়েবসাইটে বিভিন্ন ধরনের অ্যাটাক পরিচালনা করতে চায় তাহলে আমরা নির্দিষ্ট কোনো একটি আইপি ব্লক করে দিতে পারি নিচের কোডগুলো মাধ্যমে:

    # IP block

    order allow, deny
    deny from (IP)
    allow from all

    ”

    “# IP block

    Order Allow,Deny
    Allow from all
    Deny from 1.186.48.58, 65.30.114.186, 69.143.222.95″

    8. Individual File Protection

    ”
    অনেক সময় আমার নির্দিষ্ট কোন ফাইলের এক্সপ্রেস বন্ধ করার জন্য নিচের কোডগুলো ব্যবহার করতে পারি:

    # Protect the .htaccess
    <files .htaccess=””””>
    order allow,deny
    deny from all
    </files>

    ”

    9. wp-content Access Prevention

    ”
    ওয়ার্ডপ্রেসের wp-content ডাইরেক্টরি অনেক গুরুত্বপূর্ণ। কেউ যাতে কোন ম্যালিশিয়াস কনটেন্ট আমাদের wp-content ডিরেক্টরি তে না ঢোকাতে পারে তাই আমার নিচের কোডগুলো ব্যবহার করতে পারি:

    > create a new .htaccess file in wp-content directory & put the code there

    # wp-content access deny

    Order deny,allow
    Deny from all
    <Files ~ “.(xml|css|jpe?g|png|gif|js)$”>
    Allow from all
    </Files>”

     

    10. Uploads Directory Access Blocking

    ”
    আমাদের আপলোড ফোল্ডারে কেউ যাতে কোনো ধরনের ফাইল ইনজেকশন অথবা টেম্পারিং না করতে পারে তাই আমরা নিচের কোডগুলো ব্যবহার করতে পারি:

    Disable PHP and Other Files Upload on (wp-content/uploads) folder:

    ”

    Disable PHP and Other Files Upload on (wp-content/uploads) folder:
    ”
    > create a new .htaccess file in wp-content/uploads directory & put the codes there:

    # uploads directory access deny

    <Files *.php>
    deny from all
    </Files>
    # Block executables
    <FilesMatch “”\.(php|phtml|php3|php4|php5|pl|py|jsp|asp|html|htm|shtml|sh|cgi|suspected)$””>
    deny from all
    </FilesMatch>

    ”

    ”

    .HTACCESS এ এই সমস্ত কোডগুলো Injection এর মাধ্যমে আমরা খুব সহজে ওয়ার্ডপ্রেসের বিভিন্ন ধরনের VULNERABILITY দূর করতে পারি।

    “

    Follow on Facebook Follow on YouTube Follow on TikTok
    Share. Facebook LinkedIn WhatsApp Email
    Previous Articleজনপ্রিয় ওয়ার্ডপ্রেস পেজ বিল্ডার
    Next Article ওয়েবসাইটে HTTP Security Headers কি এবং কেন প্রয়োজন?

    Related Posts

    Automation WooCommerce Orders with WhatsApp

    29/08/2025

    WC Incomplete order Recovery (Single-file WooCommerce Plugin)

    23/08/2025

    WordPress এ কিভাবে অ্যাডভান্স পেমেন্ট নেওয়া যায় (BD Shop Style)

    17/07/2025

    WooCommerce ফেক অর্ডার বন্ধ করার সেরা উপায়

    13/06/2025
    fast
    Follow Me
    • Facebook
    • YouTube
    • LinkedIn
    • WhatsApp

    Categories

    • BRANDING
    • FREELANCING
    • FIVERR
    • UPWORK
    • ETHICAL HACKING
    • WORDPRESS
    • ABOUT FL FAYSAL

    FREELANICNG COURSE

    • WORDPRESS
    • WEB SECURITY
    • BUNDLE COURSE
    • Privacy Policy

    Subscribe to Updates

    © 2025 FL Blog. Designed by FL Faysal.
    Facebook Vimeo WhatsApp TikTok Instagram YouTube

    Type above and press Enter to search. Press Esc to cancel.