Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8720541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:04:01+00:00 2026-06-13T07:04:01+00:00

I have a strange behavior on my server or on my staging server, we

  • 0

I have a strange behavior on my server or on my staging server, we need to see where is the actual problem. Here is some well known code from the popular WordPress CMS:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

AddHandler application/x-httpd-php53 .php

The only difference with the original code is the added “AddHandler” at the end of the file which is required on our staging hosting provider.

The real issue is that i can access files at the following dummy urls on my development server (internal Ubuntu based 12.04 standard server) and not in production or staging (which are both the same server).

  1. /wp-content/test.php
  2. /wp-content/themes/test.php
  3. /wp-content/themes/wpactivis/test.php
  4. /wp-content/themes/wpactivis/_/test.php
  5. /wp-content/themes/wpactivis/_/ajax/test.php

Now on one set of servers, these urls return a 404 and WordPress seems to kick in automaticaly while on our dev server, 200 OK and the file content is return which is the classic “Hello world” test…

Can any htaccess guru tell me what should be the real behavior of the code pasted, should it be like the staging servers or the development server.

I tend to think it should be like the development server, any file access or directory access should be granted and not return a 404 because of the :

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

conditions!

Thank you

NOTE: Don’t tell me it’s a bad way to code wordpress or stuff like that i don’t want to hear that. We have a completely secure setup and the fact that files could be accessed directly into my plugins or themes directory is irrelevant. Tons of similar questions are posted on the web but no answer, only people saying you should do that. What i’m trying here is to get an answer as to why it is doing that on one server and not the other.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:04:03+00:00Added an answer on June 13, 2026 at 7:04 am

    Never mind, the hoster found the problem but i’ll answer it so other people can actually rely on it.

    Our hoster uses a CPanel based installation with a module that prevents serving files that are group writable.

    To migrate sites from development to staging we have chosen the “BackupBuddy” solution which is a pretty good solution for small wordpress site deployment… Problem? It extracts the files under 775. This led us to have issues with the servicing of the ajax files of our WordPress install.

    To fix this, if you have SSH access to your server, juste recursively change the permissions to 755 for directories and 644 for files using:

    find . -type f -print -exec chmod 644 {} \;
    find . -type d -print -exec chmod 755 {} \;
    

    Good luck, i hope this helps other people.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some strange behavior redirecting stdout and stderr from s3cmd. For example: $
I am experiencing some strange behavior with SQL Server CE 3.5 SP2. I have
DataPager has some strange behavior. So to situate the problem, I have a DataPagerReapeater
Having some strange behavior here. I have some XSLT which generates some html with
I am getting some strange behaviour from SQL Server. I have an underlying view
I have realy strange behavior. I have this code (I remove unrelated code). $(function()
I have a very strange behavior with Request.Form . Here are two IIS 7
This is a really strange behavior, and I've set up some demo code to
We have really strange and inconsistent behavior with Linq-to-SQL here. Our application is installed
I am getting some strange behavior involving database queries that I have never seen

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.