| Posted: 16 September 2008 at 3:49pm | IP Logged
|
|
|
Greetings... I was recommened your product for our IIS environment to redirect users to our site (MOSS 2007) We are having problems getting the code to successfully work.
Here is what we want to do...
URL: http://www.abc.com Sends the user via a 301 to http://www.abc.com/en-us/pages.home.aspx/
The thing with MOSS is that by default the redirect is a 302, we want this to explicticly be a 301.
Right now we're seeing to many hops as it's going from
1. REQUESTING: http://www.abc.com HEAD / HTTP/1.1 Connection: Keep-Alive HOST: www.abc.com User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0) Accept: */* SERVER RESPONSE: 302 Object Moved Content-Length: 170 Content-Type: text/html Location: http://www.abc.com/Pages/VariationRoot.aspx Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6219 Date: Tue, 16 Sep 2008 20:22:42 GMT Redirecting to http://www.abc.com/Pages/VariationRoot.aspx ...
2. REQUESTING: http://www.abc.com/Pages/VariationRoot.aspx HEAD /Pages/VariationRoot.aspx HTTP/1.1 Connection: Keep-Alive HOST: www.abc.com User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0) Accept: */* SERVER RESPONSE: 302 Found Date: Tue, 16 Sep 2008 20:22:42 GMT Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6219 X-AspNet-Version: 2.0.50727 Location: http://www.abc.com/en-US Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 145 Redirecting to http://www.abc.com/en-US ...
3. REQUESTING: http://www.abc.com/en-US HEAD /en-US HTTP/1.1 Connection: Keep-Alive HOST: www.abc.com User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0) Accept: */* SERVER RESPONSE: 302 Found Date: Tue, 16 Sep 2008 20:22:42 GMT Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6219 Location: http://www.abc.com/en-US/ Content-Length: 215 Content-type: text/html Redirecting to http://www.abc.com/en-US/ ...
4. REQUESTING: http://www.abc.com/en-US/ HEAD /en-US/ HTTP/1.1 Connection: Keep-Alive HOST: www.abc.com User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0) Accept: */* SERVER RESPONSE: 302 Object Moved Content-Length: 167 Content-Type: text/html Location: http://www.abc.com/en-US/Pages/Home.aspx Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6219 Date: Tue, 16 Sep 2008 20:22:42 GMT Redirecting to http://www.abc.com/en-US/Pages/Home.aspx ...
5. REQUESTING: http://www.abc.com/en-US/Pages/Home.aspx HEAD /en-US/Pages/Home.aspx HTTP/1.1 Connection: Keep-Alive HOST: www.abc.com User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0) Accept: */* SERVER RESPONSE: 200 OK Date: Tue, 16 Sep 2008 20:22:42 GMT Server: Microsoft-IIS/6.0 MicrosoftSharePointTeamServices: 12.0.0.6219 X-AspNet-Version: 2.0.50727 Cache-Control: private Expires: Tue, 16 Sep 2008 20:32:28 GMT Vary: * Content-Type: text/html; charset=utf-8 Content-Length: 38916 Maximum number of redirects occured.
Destination URI: http://www.abc.com/en-US/Pages/Home.aspx
We just want the rewrite to go from http://www.abc.com to http://www.abc.com/en-us/pages/home.aspx.
Here is the last example of the code we had been working with before the end of the day:
# Pages Redirect - Change 302 to 301 redirect RewriteCond %{HTTP:Host} VariationRoot.aspx$ RewriteRule / http\://www.abc.com/en-US/Pages/Home.aspx [I,RP]
Guidance would be appreciated.
|