.htaccess file code remove automatically after sometime?


(Mohd Kashif) #1

jab me apni .htaccess file me ye code ad karta hu
Example: Removing www. from the Domain

RewriteCond %{HTTP_HOST} =www.zaykarecipes.com
RewriteRule (.*) https://zaykarecipes.com/$1 [R=302,L]

to wo code website me sahi kaam karta hai lekin kuch time baad ye code apne aap is file se hat jata hai by default jo file ka code hota hai wahi ho jata hai please iska solution bataye
ye jab se mene digital ocean par host kari hai apni website tab se aisa ho raha hai hostgator wali hosting par to sahi kaam kar raha tha


(Jumedeen khan) #3

Aap ye code use karo aur fir bhi problem ho to yaha btao.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

(Rajesh Chauhan) #4

Agar cPanel use kar rahe hai to aksar yesa tab hota hai jab aapki hosting companies ne Apache configuaration file me us setting ko allow nahi kar rakha haiā€¦

Try this code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.zaykarecipes.com [NC]
RewriteRule ^(.*)$ https://zaykarecipes.com/$1 [L,R=301]

(Mohd Kashif) #5

mene aapka diya hua code lagaya tha kuch dino tak to raha fir kal mene dekha to remove ho gaya


(Jumedeen khan) #6

Aap mujhe btaye ki aapne digitalocean par kis server par wordpress install kiya hai.


(Mohd Kashif) #7

digital ocean plan 4 GB 2 vCPUs 80 GB 4 TB $20/mo $0.030/hr with server pilot


(Jumedeen khan) #8

Serverpilot ke liye aappko iske support team se contact karna padega.