HomeBlogging

WordPress .htaccess file Create/Edit kaise Kare

Like Tweet Pin it Share Share Email

Hello friends, aaj main apni is post me aapko bataunga ki kaise aap wordpress ki .htaccess file create/edit kar sakte hain.

.htaccess file yah hamare wordpress blog ki ek powerful configuration file hai jo ki hame apni site ki security and performance improve karne me help karti hai. Is file me changes karke aap apni site ke behavior ko change kar sakte hain like ip address blocking, redirection for multi-site, change permalink and security for site.




Yaha main aapko batane ja raha hu ki kaise aap .htaccess file create and Edit kar sakte hain.

create and edit htaccess file

.Htaccess file kya hoti hai aur Kaise dekhe?

.htaccess file, jab hum wordpress install karte hai tabhi automatic create ho jati hai, yah hamari root directory me hidden mode me rahti hai ise aap apne hosting ke Cpanel me jakar “File manager” me dekh sakte hain.

Is file se aap below work kar sakte hain:

  • Customize the Error pages for your site.
  • Protect your site with a password.
  • Enable server-side includes.
  • Deny access to your site based on IP.
  • Change your default directory page (index.html).
  • Redirect visitors to another page.
  • Prevent directory listing.
  • Add MIME types.

htaccess file ko dekhne ke liye first apne hosting ke C-panel me login kare, File option me File Manager icon par click kare, aur next popup window me show hidden files option choose kare.




File manager directory me Public_html par click kare. Ab aap apni .htaccess file dekh sakte hain.

.Htaccess file Kaise Create aur Upload kare?

WordPress hosting site me install karne ke baad lag-bhag htaccess file create ho jati hai. Lekin agar aapke file manager show nahi kar rahi hai to aap manually notepad me yah file create kar sakte hain. See how:-

1:Sabse pahle apne PC me control panel me jakar Appearance par click kare. Uske baad “Folder options” par click kare aur “View” select kare. yaha aapko “Hide extensions for known file type” ko uncheck karna hai. Setting save kar le.

2: Ab Notepad open kare aur blank file ko .htaccess name se save kare. Save  karte samay Save as Type me All files select kare.

save htaccess file notepad

Step 3: File ko save kar lene ke baad jaha file save ki hai waha jakar  ek bar confirm kar le ki file “.htaccess” name me save hui ho. Agar .htaccess.txt se save hui hai to yah galat extension hai. Ab aapko yah file FTP/file manager me upload karna hai.htaccess file notepad

htaccess file upload kare

  • Sabse pahle apne hosting account me login kare aur C-panel me jaye. waha aapko File manager par click karna hai.
  • file manager ke andar aapko Public_html par click karna hai, aur upar option panel me Upload par click karna hai.upload htaccess file

Upload window me apni created .htaccess file upload kare, aur “Permission” me agar 644 hai to use change karke 777 kar de. That’s it.





htaccess file Edit kaise kare?

Agar aapke FTP/File manager me .htaccess file already available hai to aapko yah file banane ki jarurat nahi hai, aap is file me changes kar sakte hai edit option se.

Sabse pahle apne hosting account me login karke, C-panel me file manager icon par click kare.
Next Popup window me “Web root directory” select karke show hidden files select kare aur File manager me enter kare.

htaccess edit

  • File manager ke andar aapko “public_html” directory par click karna hai, uske andar aapko .htaccess file show karegi.
  • file ke upar right click karke Edit par click kare, new window me aap koi bhi changes karke file save kar sakte hain. That’s it.

Conclusion

htaccess file ko kafi carefully edit and changement karna chahiye, agar aapne koi mistake kar di to ho sakta hai aapki site down ho jaye.

Hamesha dhyaan rahe ki jab koi new script aap file me add kar rahe ho to uske top/bottom me add kare.




Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *