Note that there are some explanatory texts on larger screens.

plurals
  1. POmod-rewrite question: /test/method is rewritten to test.svg/method
    text
    copied!<p>I noticed an odd (to me) <code>mod_rewrite</code> 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 <code>test.svg</code> in my document root, as well as an <code>index.php</code>. My expectation, based on my <code>.htaccess</code> file is that visiting <code>http://localhost/test.svg</code> would get me the <code>.svg</code> file (and it does), while visiting <code>http://localhost/test/action</code> would be rewritten to <code>index.php/test/action</code>. Instead, the latter is apparently rewritten to <code>test.svg/action</code>, as I receive the message </p> <blockquote> <p>The requested URL /test.svg/action was not found on this server.</p> </blockquote> <p>Here is my <code>.htaccess</code> file:</p> <pre><code># 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] </code></pre> <p>I am using a Apache 2.2.12 on Ubuntu (installed via <code>apt-get</code>). 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.</p> <p>As I said, fixing this issue would be trivial, I just am often confounded by <code>mod_rewrite</code> and would like to understand what's going on here.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload