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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:48:30+00:00 2026-05-13T20:48:30+00:00

I noticed an odd (to me) mod_rewrite thing happening. Fixing it is not important

  • 0

I noticed an odd (to me) mod_rewrite thing happening. Fixing it is not important to me so much as figuring out what’s going on. Basically, I have an svg file called test.svg in my document root, as well as an index.php. My expectation, based on my .htaccess file is that visiting http://localhost/test.svg would get me the .svg file (and it does), while visiting http://localhost/test/action would be rewritten to index.php/test/action. Instead, the latter is apparently rewritten to test.svg/action, as I receive the message

The requested URL /test.svg/action was not found on this server.

Here is my .htaccess file:

# Turn on URL rewriting
RewriteEngine On

# Protect application and system files from being viewed
# RewriteRule ^(application|modules|system) - [F,L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT,L]

I am using a Apache 2.2.12 on Ubuntu (installed via apt-get). I think my setup is fairly standard, but I’m not sure exactly what directives or config files would be relevant. I am by no means a sysadmin of any kind, I just use this server to test and develop things locally.

As I said, fixing this issue would be trivial, I just am often confounded by mod_rewrite and would like to understand what’s going on here.

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

    Apache’s HTTP content negotiation feature is automatically translating from “/test” to “/test.svg”. See http://httpd.apache.org/docs/2.0/content-negotiation.html#multiviews

    You can disable content-negotiation in .htaccess with the directive:

    Options -MultiViews
    

    You can get more information about what mod_rewrite is doing by adding these directives to your Apache configuration (they won’t work in .htaccess):

    RewriteLog /path/to/rewrite.log
    RewriteLogLevel 3
    

    The RewriteLogLevel can be any number from 0 (disabled) to 9 (extremely verbose). 3 should give you enough to see what’s going on, but don’t use that on a production server.

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

Sidebar

Related Questions

We've noticed something odd with our Coldfusion 8 client variables DB. We have many
I have a foreach loop that I am parallelizing and I noticed something odd.
I am using a table to render a calendar. I have noticed an odd
I noticed something odd today. I have an application that writes/read data to a
I am using jQuery deferreds, and have noticed an odd behavior. See fiddle here:
I've noticed something odd about user-defined variables: Lets say I have this table: num_table
I have noticed something odd with linq and the Contains method. It seems to
I have just noticed something really odd, which I believe might be a small
Even though I rarely have problems with FMDatabase, I noticed some odd behavior today
I noticed some odd behaviour when using the strongly typed HtmlHelper.ActionLink() extension method from

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.