oymediasolutions Posted April 9, 2021 Share Posted April 9, 2021 Hi, I have the htaccess file with the below details in it. <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$"> Order allow,deny Allow from all </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> And when i modify the file and save it, i get the the message "successfully saved". But when i refresh the page , again the file loads the old content as before. I dont know the reason, and additionally when i delete the file, it automatically reappears. ( this is not a wordpress website) Quote Link to comment Share on other sites More sharing options...
requinix Posted April 9, 2021 Share Posted April 9, 2021 Clearly you have something on the server generating this file for you. Perhaps cPanel? Is there some tool you should be using to modify this file instead of doing it yourself manually? 1 Quote Link to comment Share on other sites More sharing options...
MadTechie Posted April 9, 2021 Share Posted April 9, 2021 I agree with requinix, it looks like something created for security, but most of the time i see this on WP installs (does WP exist on the server e.g. shared hosting) Maybe check the logs to see what scripts/processes are running, change the permissions on the file to see if you get an error in the error logs etc. Hope this helps 1 Quote Link to comment Share on other sites More sharing options...
oymediasolutions Posted April 12, 2021 Author Share Posted April 12, 2021 Thank you @MadTechie and @requinix for responding. Here are few points i like to mentions: 1. The domain is an addon domain, but the site is not a Wordpress site. 2. I am editing the .htacess file in cpannel using the c-pannel editor. 3. To be sure i completely removed the addon domain and again added it, But as soon as the addon domain folder gets created, even the htaccess file is getting created automatically (not yet added the website content). 4. My original website content doesn't have htaccess file. 5. I even changed the permission of the file but still has not effect. Quote Link to comment Share on other sites More sharing options...
oymediasolutions Posted April 12, 2021 Author Share Posted April 12, 2021 The main issue this hataccess file is causing is that, when i click on the header menu items, it redirecting me back to the home page instead of navigating to the page i click on. http://jeevanjyothitrust.org ( only the aboutus page is opening as i can see that page aboutus.php is mentioned on the htaccess file) Quote Link to comment Share on other sites More sharing options...
Solution MadTechie Posted April 12, 2021 Solution Share Posted April 12, 2021 Hi oymediasolution, I am assuming that WP or another system is installed some (another domain) the problem is these share the folders, it doesn't matter if its another domain, that only see the folders, if the add-on domain inside another domain? (folder wise) for example, /public_html <- main domain /public_html/new_domain <-addon_domain if this IS the case then it maybe worth looking at the main domain and checking if the same .htaccess file exists if so then you should be able to create a addon domain at the top level instead, this MAY solve the problem e.g /public_html <- main domain /new_domain <-addon_domain Lets us know your findings and i hope this helps Quote Link to comment Share on other sites More sharing options...
oymediasolutions Posted April 17, 2021 Author Share Posted April 17, 2021 hi , Thx for the support, seems on of our site was affected with a malware, I just cleaned the server and reuploaded the site, now its working fine. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted April 17, 2021 Share Posted April 17, 2021 18 hours ago, oymediasolutions said: hi , Thx for the support, seems on of our site was affected with a malware, I just cleaned the server and reuploaded the site, now its working fine. Malware, that's what I said WordPress ☺️ (I'm joking, kinda) Well done, Quote Link to comment Share on other sites More sharing options...
sn0wslight Posted July 14, 2021 Share Posted July 14, 2021 I had the same issue. my google page was showing japanese. What I did: This malware it is saved in the directory by default public_html. I’ve noticed that it leaves subdomains alone. when i tried delete index.php and .htaccess it was renewing that files with malicious code. at my ftp i created diffirent folder and on my admin page i changet deafult folder from public_html to the name of the folder i’ve jus created. I restore the backup page to the new folder. After that i deleted public_html and changed admin pass. For now it’s working fine Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.