Jump to content

htaccess issue


Go to solution Solved by MadTechie,

Recommended Posts


I have the htaccess file with the below details in it.

<FilesMatch ".(py|exe|php)$">
 Order allow,deny
 Deny from all
<FilesMatch "^(about.php|radio.php|index.php|content.php|lock360.php|admin.php|wp-login.php)$">
 Order allow,deny
 Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


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)

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

  • Solution

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 


Link to comment
Share on other sites

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, 

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.