IIRF and Joomla

Topics: Developer Forum, Project Management Forum, User Forum
Dec 14, 2010 at 1:18 PM

Hi, I browsed a lot of web-pages and I still can't find response on my question. I have IIS 6 server and Ionic Isapi Rewriter 2.
For example I need rewrite this URL:
http://something.cz/cs/sluzby
to this:
http://something.cz/index.php?option=co ... 25&lang=cs

I found only one rewrite rule for Joomla on IIS.

MaxMatchCount 10
RewriteCond %{HTTP_URL} (/|\.htm|\.php|\.html|/[^.]*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php [U,L]

This rule rewrite me everytime on http://something.cz/index.php. I know where is problem, but I can't IIRF syntax. So I want petition to someone, who know the syntax, to help me. Thank you very much and sorry for my bad english :-)

Coordinator
Dec 14, 2010 at 2:34 PM

I don't know Joomla, but ...

I think some of the confusion about how to use IIRF with Joomla comes from the fact that Joomla has several options for how rewriting is done.  This page in the IIRF wiki talks about some of those issues and the approach to use. 

In your specific case, yes, the one statement reading "RewriteRule (.*) /index.php" will rewrite all URLs to /index.php.  I don't know why you would want to do that.

Dec 15, 2010 at 6:35 AM

Hi Cheeso, thank you for your reply. Yesterday I found this .ini file:

RewriteLog  C:\temp\xxx.out
RewriteLogLevel 3

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_URL} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$
RewriteRule ^/(?!index\.php)(.*)$ /index.php/$1 [U,L]

Without use SEF my addresses looks like this: http://www.something.cz/index.php?option=com_content&view=article&id=66&Itemid=29&lang=cs

With SEF: http://www.something.cz/cs/sluzby

In IIRF log a found that URL /cs/sluzby is rewrite to /index.php/cs/sluzby

This rewrite rules on top works great. Problem is, that few addresses, that I use looks like : http://www.something.cz/cs/novinky/xxxx-xxxx-xxxx

This URL doesn't rewrite successfull. Can someone help me, rewrite my rules, to work. Thanks a lot.

Coordinator
Dec 17, 2010 at 5:03 PM
petrkop1 wrote:

Problem is, that few addresses, that I use looks like : http://www.something.cz/cs/novinky/xxxx-xxxx-xxxx

This URL doesn't rewrite successfull.

ok, I'll try.  You said the rewrite isn't successful.  But you haven't described what you WANT to happen, and what is ACTUALLY happening.

If you get a url like  http://something.cz/cs/novitsky/xxx-xx-xxxx , what do you want to rewrite it to?