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 3600684
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:31:35+00:00 2026-05-18T20:31:35+00:00

There seems to be a problem between how PHP engine handles identical files that

  • 0

There seems to be a problem between how PHP engine handles identical files that differ only in their file extension.

Problem: "An If-Modified-Since conditional request returned the full content unchanged."

Also, I measured that the .php extension loads much faster than identitcal twin with .xxx extension even though the file contents are identical, and they differ only in their file extension.

alt text

alt text

"HTTP allows clients to make
conditional requests to see if a copy
that they hold is still valid. Since
this response has a Last-Modified
header, clients should be able to use
an If-Modified-Since request header
for validation. RED has done this and
found that the resource sends a full
response even though it hadn’t
changed, indicating that it doesn’t
support Last-Modified validation."


homepage ending with .php

alt text


exact same file, but ending .ast

alt text


Given:

A home.php file is copied as home.xxx and this extension is added to htaccess to recognize it as a PHP file. The .php file listen to the php.ini where freshness is set to 3 hrs, the non .php files have to listen to htaccess where freshness is set to 2 hrs according to:

AddType application/x-httpd-php .php .ast .abc .xxx .etc

<IfModule mod_headers.c>
    ExpiresActive On
    ExpiresDefault M2419200
    Header unset ETag
    FileETag None
    Header unset Pragma
    Header set Cache-Control "max-age=2419200"

    ##### DYNAMIC PAGES
    <FilesMatch "\\.(ast|php|abc|xxx)$">
        ExpiresDefault M7200
        Header set Cache-Control "public, max-age=7200"
    </FilesMatch>
</IfModule>

So far so good and everything loads, except, the non-php file doesn’t cache properly, or it does cache well but doesn’t validate well, to be more specific. See images enclosed. Only the non-php file extension causes the error and loads slower.

The entire page.php loads faster as somehow all the elements in there then load properly from cache, while the page.abc has the full request returned while it ought to be cached, meaning the entire page is slower.

Bottom line: What should be changed, in order eliminate the If-Modified-Since conditional request returning the full content unchanged?

  • 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-05-18T20:31:36+00:00Added an answer on May 18, 2026 at 8:31 pm

    It seems like your server is having trouble determining how to decode the extension, since it is not .php. Even if you defined the extension to be recognized as php in your httpacess, it still requires some extra steps for the server to process the page, meaning it will always take longer then just using .php (although it should only be a few ms difference, most likely a server problem is causing this to take much longer). Why not just use the .php extension on your pages? Why do you need .abc? It’s always best to just use the default extension instead of masking it.

    EDIT: Put this function on the top of each page, it will detect what domain name the user is on, strip the www and domain extension and then display content for that specific domain name only. You can use the same .php file for every domain name and don’t have to do any funky extensions.

    <?php
    $domain = explode(".", $_SERVER['SERVER_NAME']);
    if ($domain[2]) {
        $domainName = $domain[1];
    }
    else {
        $domainName = $domain[0];
    }
    
    if ($domainName = "YourDomainNameWithNoExtension") {
        echo "Welcome to $domainName";
    }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There seems to be a problem between how PHP engine handles identical files that
I've found that there seems to be a problem using css transitions properties when
I want to test the phpDocumentor-alpha, and there's a problem that some people seems
I have a php script that transfers a bunch of files between servers with
I just implemented a multi-language mod onto my website. Problem is that there seems
There seems to be a problem when virtualenv is used in PowerShell. When I
Hi i encountered this problem whereby when i initialized my String[], there seems to
I seem to have a problem converting an array backwards and forwards between PHP/JS.
Ever since updating to the latest ADT (version 18), I've noticed that there seems
Seems there's nothing to do… using the combo prototype/lowpro, no problems at all with

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.