iirf not working for wordpress blog

Apr 21, 2010 at 8:11 AM

my rule-

RewriteCond  %{HTTP_HOST}  ^blog.schoolsearch\.in(.*)$
RewriteRule ^/(.*)$       http://www.schoolsearch.in/blog/index.php/$1   [L] 

example url- http://blog.schoolsearch.in/how-to-create-an-active-school-profile/

above url should be rewritten as - http://www.schoolsearch.in/blog/index.php/how-to-create-an-active-school-profile/

 

in IIRF logs-

------------------------------------------------------------------------------------------------------------------------------------------------------

Wed Apr 21 02:55:24 - 22236 - ReadSiteConfig: Done reading, found 57 rules (0 errors, 2 warnings) on 225 lines
Wed Apr 21 02:55:24 - 22236 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Apr 21 02:55:24 - 22236 - HttpFilterProc: cfg= 0x021A40E8
Wed Apr 21 02:55:24 - 22236 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Wed Apr 21 02:55:24 - 22236 - DoRewrites
Wed Apr 21 02:55:24 - 22236 - DoRewrites: Url (no decoding): '/how-to-create-an-active-school-profile/'
Wed Apr 21 02:55:24 - 22236 - EvaluateRules: depth=0
Wed Apr 21 02:55:24 - 22236 - EvaluateRules: Rule 1 : 2 matches
Wed Apr 21 02:55:24 - 22236 - EvalCondition: Cond %{HTTP_HOST} ^schoolsearch\.in$ => FALSE
Wed Apr 21 02:55:24 - 22236 - EvalConditionList: rule 1, FALSE, Rule does not apply
Wed Apr 21 02:55:24 - 22236 - EvaluateRules: Rule 2 : 2 matches
Wed Apr 21 02:55:24 - 22236 - EvalCondition: Cond %{HTTP_HOST} ^blog.schoolsearch\.in(.*)$ => TRUE
Wed Apr 21 02:55:24 - 22236 - EvalConditionList: rule 2, TRUE, Rule will apply
Wed Apr 21 02:55:24 - 22236 - EvaluateRules: Result (length 81): http://www.schoolsearch.in/blog/index.php/how-to-create-an-active-school-profile/
Wed Apr 21 02:55:24 - 22236 - EvaluateRules: Last Rule
Wed Apr 21 02:55:24 - 22236 - EvaluateRules: returning 1
Wed Apr 21 02:55:24 - 22236 - DoRewrites: Rewrite Url to: 'http://www.schoolsearch.in/blog/index.php/how-to-create-an-active-school-profile/'
Wed Apr 21 02:55:24 - 22236 - HttpFilterProc: SF_NOTIFY_URL_MAP
Wed Apr 21 02:55:24 - 22236 - HttpFilterProc: cfg= 0x021A40E8
Wed Apr 21 02:55:24 - 22236 - HttpFilterProc: SF_NOTIFY_LOG

 

--------------------------------------------------------------------------------------------------------------------------------

means rule works correctly , it is rewritten to correct url but still I get - page cannot be found. If I type this url directly in browser it works perfectly. and If I change the rewrite url to redirect rule then also it works fine. I mean

RewriteCond  %{HTTP_HOST}  ^blog.schoolsearch\.in(.*)$
RedirectRule ^/(.*)$       http://www.schoolsearch.in/blog/index.php/$1   [R=302]

If i do this then also it works fine.

-

Nishant

 

Coordinator
Apr 21, 2010 at 3:53 PM

You cannot rewrite to a URL that starts with http.  That's not quitee true.  You CAN do that, but it's not likely to do what you think it should be doing. It's very unusual.

If you look in your logfile, you will see a warning regarding that rule, specifically for that reason.

It seems that you want to use that URL to change the server name, and also to change the URL path.  You can do that with a redirect.  You can't do that with a rewrite. If you don't understand the difference, read this page.  

Good luck.

Apr 26, 2010 at 12:13 PM

thanks, quite a silly mistake