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 post
Share on other sites

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?

  • Like 1
Link to post
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 post
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 post
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 post
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 post
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 post
Share on other sites

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.