| Author |
|
360esoft Newbie

Joined: 05 April 2011 Location: Canada
Online Status: Offline Posts: 5
|
| Posted: 05 April 2011 at 8:59am | IP Logged
|
|
|
Hi,
I have version 2.x of Isapi_rewrite on my IIS server,
where I also have an ExpressionEngine 2.1.3 install.
I am trying to remove the index.php from the url, but I
can't find a way to do it properly, various things are
suggested on the EE forums but nothing actually works.
I have 2 folders for languages:
my url is: www.website.com/en/index.php/site
and www.website.com/fr/index.php/site
I want to have a clean url : www.website.com/en/site and
www.website.com/fr/site
Any suggestions?
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 06 April 2011 at 5:33am | IP Logged
|
|
|
Please try to have the following rules:
[ISAPI_Rewrite]
RewriteRule /(en|fr)/index\.php/(.*) /$1/$2 [I,RP]
RewriteRule /(en|fr)/(?!index\.php)(.*) /$1/index.php/$2 [I,L]
Please note that you may have some issues with images/css if you have relative links on pages (so it's better to have root-relative or
absolute ones).
__________________ Regards,
Anton
|
| Back to Top |
|
| |
360esoft Newbie

Joined: 05 April 2011 Location: Canada
Online Status: Offline Posts: 5
|
| Posted: 06 April 2011 at 7:41am | IP Logged
|
|
|
It's not working. I am getting page cannot be found.
Which file do I have to put the code into: IIRF.ini, or
httpd.ini, or httpd.conf? I have seen so many different
answers on forums that I am mixed up.
Where should the file go? At the root, or a file in each
language folder?
thanks for your help!
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 06 April 2011 at 8:27am | IP Logged
|
|
|
If you use ISAPI_Rewrite 2, the config must be httpd.ini.
You should place in the root of the site.
Please also specify the request you are making for testing.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
360esoft Newbie

Joined: 05 April 2011 Location: Canada
Online Status: Offline Posts: 5
|
| Posted: 06 April 2011 at 8:39am | IP Logged
|
|
|
I am not sure it dos something.
Is there some line of code I can add to the httpd.ini file
so it creates a log, to see what it's actually doing?
I am accessing the website successfully at the
www.website.com/en/ or www.website.com/fr/ level. It
doesn't work when I click to go on a subpage, such as
www.website.com/en/product . I am running on
ExpressionEngine, so there is no actual "product" folder...
It's part of EE's templates inside the CMS.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 06 April 2011 at 8:59am | IP Logged
|
|
|
"when I click to go on a subpage, such as www.website.com/en/product"
- and should /en/product be resolved as /en/index.php/product ?
How should ISAPI_Rewrite know if the request must/mustn't be processed?
Please explain.
Unfortunately, logs are not available in ISAPI_Rewrite 2.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
360esoft Newbie

Joined: 05 April 2011 Location: Canada
Online Status: Offline Posts: 5
|
| Posted: 06 April 2011 at 9:09am | IP Logged
|
|
|
Anton wrote:
- and should /en/product be resolved as
/en/index.php/product ?
How should ISAPI_Rewrite know if the request must/mustn't
be processed?
Please explain. |
|
|
Forgive me if I'm not clear enough, I'm totally clueless
about these kind of things as I'm not a developer or
anything.
If I type in the url /en/index.php/product, the page
shows up perfectly. But I am trying to obtain a clean
url, /en/product. What should be added so the config file
knows that?
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 07 April 2011 at 1:52am | IP Logged
|
|
|
Please try it like this:
[ISAPI_Rewrite]
RewriteRule /(en|fr)/(?!index\.php.*)([^/.]+) /$1/index.php/$2 [I,L]
If it doesn't work, please test if ISAPI_Rewrite is working by putting the following line at the top of the config:
RewriteRule /test.* http\://www.google.com [RP]
Then make request to www.yoursite.com/test. If you get 404 error, there's smth wrong, if you get Google page, ISAPI_Rewrite operates fine.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
360esoft Newbie

Joined: 05 April 2011 Location: Canada
Online Status: Offline Posts: 5
|
| Posted: 07 April 2011 at 7:59am | IP Logged
|
|
|
Apparently there's something wrong, because the Google test
didn't work, I am getting the 404 page.
I think I'm going to leave it for the moment, and
unfortunately the system analyst who takes care of servers
is out of the office today, so I can't even know what's
going on with the isapi install or EE.
Thanks for your help though, it's very appreciated :)
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 08 April 2011 at 2:24am | IP Logged
|
|
|
Ok, so if your system analyst doesn't manage to make ISAPI_Rewrite working toll Monday, I suggest that we arrange an online meeting or Remote
Desktop access to your server, so we could check it live.
__________________ Regards,
Anton
|
| Back to Top |
|
| |