Note that there are some explanatory texts on larger screens.

plurals
  1. POmod_rewrite issues using ISAPI_rewriter on IIS6
    text
    copied!<p>I'm hoping non-IIS people can help me on this though the issue I'm having is based around an IIS6 server running ISAPI_Rewriter. </p> <p>The situation is that I'm running Wordpress on IIS6, ISAPI_Rewriter is being used to act as a replacement for mod_rewrite and is functioning properly. My problem is that when I get it to rewrite my URLs for Wordpress (so I don't need the index.php filename in it) it shows a 404. After much searching I found the problem was because part of the ASP.net (or something similar) was adding eurl.axd/[random string] to the end of the URLs and so this was being fed into the Wordpress request and breaking it. I set the Wordpress template to output the requested URL and it looks something like this:</p> <p><a href="http://www.example.com/index.php/about/eurl.axd/b552863f2d5e9841b5d8b79b44ac02e8/" rel="nofollow">http://www.example.com/index.php/about/eurl.axd/b552863f2d5e9841b5d8b79b44ac02e8/</a></p> <p>I believe this is because of the pecking order of various things in the IIS system and the culprit is required to run another part of the project. I'd prefer to keep using ISAPI_Rewriter to pretty up the URLs so I'd like to know this:</p> <p>Is there any way of getting mod_rewrite to remove eurl.axd/[string] before feeding it on to the system?</p> <p>My .htaccess file currently appears as such:</p> <pre><code>RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # The following line excludes folders from rewriting RewriteCond %{REQUEST_URI} !^/folder-name/ RewriteRule ^/(.*)$ /$1 [NC,L] </code></pre> <p>Thanks for all the help, it is always greatly appreciated.</p> <hr> <p>EDIT: Have adjusted my htaccess based on suggestions and it seems to work well from the brief tests I have carried out. Have posted it below.</p> <pre><code>RewriteEngine on RewriteBase / # This is used to strip ASP.net eurl.axd bits # from the URL so wordpress can use permalinks # For the root RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/wp-admin/ RewriteRule ^eurl\.axd/[0-9a-f]+/$ index.php [NC,L] # For internal permalinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/wp-admin/ RewriteRule ^(.*)/eurl\.axd/[0-9a-f]+/$ index.php/$1 [NC,L] </code></pre>
 

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