| Author |
|
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 07 August 2006 at 9:33am | IP Logged
|
|
|
My hosting provider has installed the full version of ISAPI_Rewrite but I am really stumped as to how to get it to work.
Anything I put in my httpd.ini simply causes the whole site to return a 404 error. If I turn on SEF URLS in Joomla I can see the front page, and static URLS, but they are all broken.
I am a newbie and this concept. My eyes glaze over when I look at all the rewrite rules. Is there any global setting that would do some sort of default rewrite?
Is there a clear, SIMPLE example I could follow along with?
Thanks,
Mike
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 07 August 2006 at 9:40am | IP Logged
|
|
|
Quote:
Anything I put in my httpd.ini simply causes the whole site to return a 404 error. |
|
|
That is hardly possible. Show rules those you are using.
Quote:
Is there any global setting that would do some sort of default rewrite? |
|
|
Waht do you mean by "default rewrite"?
Quote:
Is there a clear, SIMPLE example I could follow along with?
|
|
|
There is a number of basic samples in the documentation.
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 07 August 2006 at 10:18am | IP Logged
|
|
|
"That is hardly possible. Show rules those you are using. "
Hi,
I'm glad to hear yout think it's hardly possible. I'd be happy to be wrong about the whole thing... 
This is the contents of the httpd.ini file in my site's root directory, The Jomla installation is also in the root directory.
Here are the contents:
[ISAPI_Rewrite]
# This is a comment
# 300 = 5 minutes CacheClockRate 300 RepeatLimit 20
# Rules for Joomla! search engine friendly URLS RewriteCond Host: www\.thedecisioncoach\.com RewriteRule ^/(.*)/\?(.*) /?$1&$2
RewriteCond Host: www\.thedecisioncoach\.com RewriteRule ^/(.*)/ /?$1
# Block external access to the httpd.ini and httpd.parse.errors files RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
# Block external access to the Helper ISAPI Extension RewriteRule .*\.isrwhlp / [F,I,O]
# Some custom rules RewriteCond Host: (.+) RewriteRule (.*) /$1$2
"Waht do you mean by "default rewrite"?"
Global rewrite rules. I don't need anything fancy.
"There is a number of basic samples in the documentation."
If you point out a couple that you think I could pop in and use, I'd be most grateful. 
-Mike
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 07 August 2006 at 10:56am | IP Logged
|
|
|
Please, explain what those rules should do. 1st and 2nd look too generic. I guess they could rewrite much more than really needed.
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 07 August 2006 at 11:27am | IP Logged
|
|
|
"Please, explain what those rules should do. 1st and 2nd look too generic. I guess they could rewrite much more than really needed."
Hi,
I have no idea. I was looking around forums and someone posted this example and said it would work.
This is massive amount of coding that I don't understand so I was just looking for some way to have some sort of global rewrite.
I will say that when I remove httpd.ini completley and simplly set search engine friendly URLS to "yes" in Joomla, I get what look like search engine friendly URLs but they are all broken links.
-Mike
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 07 August 2006 at 11:52am | IP Logged
|
|
|
Almost all rewrite rules are application-specific. There is no universal "silver bullet" that could work in any case.
Sorry, I do not know how to help you if you can not describe transformations those you need.
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 07 August 2006 at 12:01pm | IP Logged
|
|
|
"Almost all rewrite rules are application-specific. There is no universal "silver bullet" that could work in any case. Sorry, I do not know how to help you if you can not describe transformations those you need."
What do you mean by application specific?
To be as specific as I can be, I have several links coming off of the front page.
Like, for example, down the side of my pages are these links:
http://www.thedecisioncoach.com/index.php?option=com_content &task=section&id=1&Itemid=2
http://www.thedecisioncoach.com/index.php?option=com_content &task=blogsection&id=0&Itemid=9
http://www.thedecisioncoach.com/index.php?option=com_content &task=category§ionid=3&id=7&Itemid=25
http://www.thedecisioncoach.com/index.php?option=com_contact &Itemid=3
http://www.thedecisioncoach.com/index.php?option=com_search& amp;Itemid=5
http://www.thedecisioncoach.com/index.php?option=com_newsfee ds&Itemid=7
http://www.thedecisioncoach.com/index.php?option=com_wrapper &Itemid=8
What would I do to make these "static"?
Do I need a seperate rule for every page I create?
Please bear with me- I am a total newbie and I'm just not getting this yet.
-Mike Davis
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 07 August 2006 at 12:09pm | IP Logged
|
|
|
Quote:
What do you mean by application specific?
|
|
|
I mean that for different applications rules will be different.
Quote:
Like, for example, down the side of my pages are these links: |
|
|
And how these links look when you enable "search-engine-friendly URLs"?
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 07 August 2006 at 12:25pm | IP Logged
|
|
|
"And how these links look when you enable "search-engine-friendly URLs"?"
Hi, They look like this: (I have incuded the original first then the SEF one below it.)
http://www.thedecisioncoach.com/index.php?option=com_content &task=section&id=1&Itemid=2 http://www.thedecisioncoach.com/content/section/1/2/
http://www.thedecisioncoach.com/index.php?option=com_content &task=blogsection&id=0&Itemid=9 http://www.thedecisioncoach.com/content/blogsection/0/9/
http://www.thedecisioncoach.com/index.php?option=com_content &task=category§ionid=3&id=7&Itemid=25 http://www.thedecisioncoach.com/content/category/3/7/25/
http://www.thedecisioncoach.com/index.php?option=com_weblink s&Itemid=23 http://www.thedecisioncoach.com/component/option,com_weblink s/Itemid,23/
http://www.thedecisioncoach.com/index.php?option=com_contact &Itemid=3 http://www.thedecisioncoach.com/component/option,com_contact /Itemid,3/
http://www.thedecisioncoach.com/index.php?option=com_search& amp;Itemid=5 http://www.thedecisioncoach.com/component/option,com_search/ Itemid,5/
http://www.thedecisioncoach.com/index.php?option=com_newsfee ds&Itemid=7 http://www.thedecisioncoach.com/component/option,com_newsfee ds/Itemid,7/
http://www.thedecisioncoach.com/index.php?option=com_wrapper &Itemid=8 http://www.thedecisioncoach.com/component/option,com_wrapper /Itemid,8/
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 08 August 2006 at 8:40am | IP Logged
|
|
|
So, rules will be like follows:
RewriteRule /content/(\w+)/(\d+)/(\d+) /index.php\?option=content&task=$1&id=$2&ItemId=$3 [I,L]
RewriteRule /component(\?[^/]*)?/([^,]*),([^/]*)(.*) /component(?1$1&:\?)$2=$3$4 [NS,I]
RewriteRule /component(\?[^/]*)?/? /index.php$1 [I,L]
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 08 August 2006 at 10:13am | IP Logged
|
|
|
Hi,
Thanks for this answer. However, The links are all still breaking.
This is what my httpd.ini file now looks like. Is this correct?
[ISAPI_Rewrite]
# This is a comment
# 300 = 5 minutes CacheClockRate 300 RepeatLimit 20
# Block external access to the httpd.ini and httpd.parse.errors files RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
# Block external access to the Helper ISAPI Extension RewriteRule .*\.isrwhlp / [F,I,O]
# Rewrite Rules from the Helicon ISAPI_Rewrite Support Forum
RewriteRule /content/(\w+)/(\d+)/(\d+) /index.php\?option=content&task=$1&id=$2&ItemId= $3 [I,L] RewriteRule /component(\?[^/]*)?/([^,]*),([^/]*)(.*) /component(?1$1&:\?)$2=$3$4 [NS,I] RewriteRule /component(\?[^/]*)?/? /index.php$1 [I,L]
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 08 August 2006 at 12:46pm | IP Logged
|
|
|
Yes, ini file is correct.
Show me a link that do not work and corresponding IIS log record.
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 08 August 2006 at 3:22pm | IP Logged
|
|
|
OK, FYI the SEF links with the commas in them are now working like:
http://www.thedecisioncoach.com/component/option,com_wrapper /Itemid,8/
but the ones with just the directory paths like
http://www.thedecisioncoach.com/content/section/1/2/
are still broken
Here are all the log records from today:
#Software: Microsoft Internet Information Services 6.0#Version: 1.0#Date: 2006-08-08 19:57:17#Fields: date time cs-method cs-uri-stem c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-bytes 2006-08-08 19:57:17 GET /templates/be2004-2/images/content_bg.png 71.250.15.80 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET +CLR+2.0.50215;+.NET+CLR+1.1.4322) http://www.thedecisioncoach.com/component/option,com_weblink s/catid,2/Itemid,26/ 404
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 09 August 2006 at 9:30am | IP Logged
|
|
|
Hi- Does this help you?
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 09 August 2006 at 12:21pm | IP Logged
|
|
|
Please, do not post huge logs here. It would be sufficient to post only a few sample lines.
From log I have seen that /templates/be2004-2/images/content_bg.png URL and similar do not work.
How it looks without "SE links" option?
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 09 August 2006 at 2:31pm | IP Logged
|
|
|
Hi,
Sorry about that. Like I keep saying this is really not making much sense to me. I did not know what you were looking for so I posted just part one day's logs in hopes you'd see what you are looking for. I will post a few lines and *hope* it's what you were asking for. I have turned off the SEF URLS at this point so nothing should be a static address. If this isn't enough info, is there a way to attach a larger section of the log file?
-Mike
#Software: Microsoft Internet Information Services 6.0 #Version: 1.0 #Date: 2006-08-09 17:47:29 #Fields: date time cs-method cs-uri-stem c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-bytes 006-08-09 17:47:30 GET /templates/be2004-2/images/content_bg.png 70.111.204.85 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET +CLR+2.0.50215;+.NET+CLR+1.1.4322) http://www.thedecisioncoach.com 404 1830 2006-08-09 17:47:30 GET /templates/be2004-2/images/arrow.gif 70.111.204.85 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET +CLR+2.0.50215;+.NET+CLR+1.1.4322) http://www.thedecisioncoach.com 404 1830 2006-08-09 17:47:30 GET /templates/be2004-2/images/left_bar_bg2.jpg 70.111.204.85 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET +CLR+2.0.50215;+.NET+CLR+1.1.4322) http://www.thedecisioncoach.com 200 1637 2006-08-09 17:47:30 GET /templates/be2004-2/images/search_bg.png 70.111.204.85 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET +CLR+2.0.50215;+.NET+CLR+1.1.4322) http://www.thedecisioncoach.com 200 530 2006-08-09 17:47:30 GET /templates/be2004-2/images/read.gif 70.111.204.85 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET +CLR+2.0.50215;+.NET+CLR+1.1.4322) http://www.thedecisioncoach.com 404 1830 2006-08-09 17:47:30 GET /images/stories/food/coffee.jpg 70.111.204.85 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET +CLR+2.0.50215;+.NET+CLR+1.1.4322) http://www.thedecisioncoach.com 200 0
Thanks,
Mike
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 11 August 2006 at 2:25pm | IP Logged
|
|
|
So, that file (/templates/be2004-2/images/arrow.gif) is simply missing on your site.
What URIs are not working due to missing rules?
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 11 August 2006 at 3:28pm | IP Logged
|
|
|
Hi.
Specifically,
The URLS with commas in them work, the ones without do not. Here are the list of links (there aren't many) and I have notated whether or not they work.
From the main menu:
http://www.thedecisioncoach.com/component/option,com_frontpa ge/Itemid,1/ WORKS http://www.thedecisioncoach.com/content/section/1/2/ 404 ERROR http://www.thedecisioncoach.com/content/blogsection/0/9/ 404 ERROR http://www.thedecisioncoach.com/content/category/3/7/25/ 404 ERROR http://www.thedecisioncoach.com/component/option,com_contact /Itemid,3/ WORKS http://www.thedecisioncoach.com/component/option,com_search/ Itemid,5/ WORKS http://www.thedecisioncoach.com/component/option,com_weblink s/catid,2/Itemid,26/ WORKS http://www.thedecisioncoach.com/content/section/4/31/ 404 ERROR http://www.thedecisioncoach.com/content/section/2/36/ 404 ERROR
Thanks,
Mike
|
| Back to Top |
|
| |
miked12345 Newbie

Joined: 07 August 2006
Online Status: Offline Posts: 20
|
| Posted: 14 August 2006 at 3:36pm | IP Logged
|
|
|
Hi,
Does this pattern of which links work help?
|
| Back to Top |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 7598
|
| Posted: 14 August 2006 at 6:20pm | IP Logged
|
|
|
Ops, it is my mistake. Change the first rule to:
RewriteRule /content/(\w+)/(\d+)/(\d+)/? /index.php\?option=content&task=$1&id=$2&ItemId=$3 [I,L]
|
| Back to Top |
|
| |