Note that there are some explanatory texts on larger screens.

plurals
  1. POJoomla Search Engine Friendly URLs issue on IIS7
    primarykey
    data
    text
    <p>I have Joomla 1.5.9 running with php 5.2.8, mySQL 5.1.31 on IIS7 on a vista 64 dev box. I have both SEO Settings "Search Engine Friendly URLs" and "Use Apache mod_rewrite" working correctly.</p> <p>I'm also setting up a hosted site (with www.mochahosting.com). They use slightly older versions of the same software: Joomla 1.5.5, php 5.2.6, mySQL 5.0.4x. They also use IIS7, but running on Windows 32. </p> <p>I can't get either of the SEO settings to work <strong>on the hosted site</strong> (I have gotten the SEO settings to work on my local machine, with pretty much the same configuration). Let's start with "Search Engine Friendly URLs" only to keep things simple.</p> <p>Also, I don't yet have a domain name, so I use a hosts file alias to get to the site. I don't expect anyone to go through that trouble to answer my question, so I'll just describe the issue and hope I do a good enough job that people can understand what's going on. I'll use <a href="http://nodomainyet.com/joomla156_mx" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx</a> as the base URL (i.e., the joomla home page) for the purpose of this question. Yes, this does imply that Joomla is installed in a subdirectory -- I'm not sure if this is a problem or not (it's not a problem on my dev box).</p> <p>On to the problem.</p> <p>Turning on "Search Engine Friendly URLs" causes <a href="http://nodomainyet.com/joomla156_mx" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx</a> to generate a 404 ("Component not found"). In the 404 error page there is a link that goes to <a href="http://nodomainyet.com/joomla156_mx/index.php" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx/index.php</a> -- and that link works. If I turn off "Search Engine Friendly URLs" then both <a href="http://nodomainyet.com/joomla156_mx" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx</a> and <a href="http://nodomainyet.com/joomla156_mx/index.php" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx/index.php</a> work. So it seems that turning on "Search Engine Friendly URLs" causes the "automatic redirecting" of <a href="http://nodomainyet.com/joomla156_mx" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx</a> to <a href="http://nodomainyet.com/joomla156_mx/index.php" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx/index.php</a> to stop working...</p> <p>Now, if I go to <a href="http://nodomainyet.com/joomla156_mx/index.php" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx/index.php</a> and from there navigate to the various main menu links (I'm only using the default joomla site that gets installed with a new Joomla instance), then everything works fine. It's just going to <a href="http://nodomainyet.com/joomla156_mx" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx</a> that doesn't work. It's worth noting that the "home" link that's in the main menu goes to <a href="http://nodomainyet.com/joomla156_mx" rel="nofollow noreferrer">http://nodomainyet.com/joomla156_mx</a> by default.</p> <p>I've compared the output of phpinfo on the host to that of my dev box and couldn't see any differences that would cause this issue...</p> <p>Turning on the second SEO setting -- "Use Apache mod_rewrite" -- does not solve the problem (one would think that it might, since the purpose of that setting is to get rid of index.php in the URL).</p> <p>The "Search Engine Friendly URLs" usually seems pretty trivial to get to work -- it doesn't require a web.config and rewrite rules... I'm not sure what could possibly cause it to go wrong.</p> <hr> <p><strong>Update - 2009-03-03</strong></p> <p>I thought maybe it was a bad idea to only turn on the first SEO setting ("Search Engine Friendly URLs") from ("Use Apache mod_rewrite") (even though I can just turn on "Search Engine Friendly URLs" by itself on my local machine and it works fine). So I tried a few more experiments</p> <p>I thought perhaps the problem was that URL rewriting wasn't setup properly in IIS7 on the host. I did the (first) test file described in <a href="http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module" rel="nofollow noreferrer">http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module</a> and that worked -- so that means URL rewriting is working.</p> <p>Then I thought perhaps the problem is that the rewrite rules that one sees everywhere for Joomla on IIS7 need to be rewritten to take into account the subdirectory. Like I said above, the SEO settings are working fine on my local machine. Joomla is also installed in a subdirectory, and everything is working fine. Nevertheless, I tried to modify the rewrite rule from </p> <pre><code>&lt;rewrite&gt; &lt;rules&gt; &lt;rule name="Imported Rule 1" enabled="true"&gt; &lt;match url="(.*)" ignoreCase="false" /&gt; &lt;conditions logicalGrouping="MatchAll"&gt; &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" /&gt; &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" /&gt; &lt;add input="{SCRIPT_NAME}" negate="true" pattern="^/index.php" ignoreCase="false" /&gt; &lt;add input="{SCRIPT_NAME}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" /&gt; &lt;/conditions&gt; &lt;action type="Rewrite" url="index.php" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; </code></pre> <p>to </p> <pre><code>&lt;rewrite&gt; &lt;rules&gt; &lt;rule name="Imported Rule 1" enabled="true"&gt; &lt;match url="(.*)" ignoreCase="false" /&gt; &lt;conditions logicalGrouping="MatchAll"&gt; &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" /&gt; &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" /&gt; &lt;add input="{SCRIPT_NAME}" negate="true" pattern="^/joomla156mx/index.php" ignoreCase="false" /&gt; &lt;add input="{SCRIPT_NAME}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" /&gt; &lt;/conditions&gt; &lt;action type="Rewrite" url="joomla156mx/index.php" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; </code></pre> <p>(i.e., prepending the directory name to the condition and action). That didn't make a difference. Now, I'm completely new to rewrite rules so I might have screwed up something.</p> <p>I guess I find it kind of suspicious that there is no redirect rule; meaning if I copy &amp; paste a 're-written' URL, does't something have to tell the server that is a made-up URL, and it should be redirected to a real URL? But, again, this is all working fine on my local box with plain old rewrite rules, so I may be barking at the wrong tree.</p> <p>Thanks for the help!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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