Sun One Web server URL rewriting

  • Follow


I'm using the Sun One Web server 6.1 SP4.

For all URL of "domain.com", we want to rewrite it to "www.domain.com".
which means if a user type "domain.com" in his /her web browser, we
want to
add "www" in the front, like "www.domain.com" in his / her browser url
location bar.

In apache, it's easy to use "rewrite" in httpd.conf file. I don't know
to to acheive this in Sun One web server.

Any idea? 

Thanks in advance.

0
Reply tom672 (22) 7/6/2006 7:26:29 AM

tom wrote:
> I'm using the Sun One Web server 6.1 SP4.
> 
> For all URL of "domain.com", we want to rewrite it to "www.domain.com".
> which means if a user type "domain.com" in his /her web browser, we
> want to
> add "www" in the front, like "www.domain.com" in his / her browser url
> location bar.
> 
> In apache, it's easy to use "rewrite" in httpd.conf file. I don't know
> to to acheive this in Sun One web server.
> 
> Any idea? 

I think you're in the wrong newsgroup. Solaris and Sun One Web Server 
are both products of Sun Microsystems but they share no technology and 
no special user base. Look for a forum devoted to Sun One or web servers 
in general.
0
Reply Henry 7/6/2006 11:24:08 AM


tom wrote:

> For all URL of "domain.com", we want to rewrite it to "www.domain.com".
> which means if a user type "domain.com" in his /her web browser, we
> want to
> add "www" in the front, like "www.domain.com" in his / her browser url
> location bar.

Maybe this helps
http://docs.sun.com/source/819-0130/agcontnt.html#wp1017783
0
Reply Oscar 7/6/2006 9:20:11 PM

tom wrote:
> I'm using the Sun One Web server 6.1 SP4.
>
> For all URL of "domain.com", we want to rewrite it to "www.domain.com".
> which means if a user type "domain.com" in his /her web browser, we
> want to
> add "www" in the front, like "www.domain.com" in his / her browser url
> location bar.
>
> In apache, it's easy to use "rewrite" in httpd.conf file. I don't know
> to to acheive this in Sun One web server.
>
> Any idea?
>
> Thanks in advance
URL rewriting is typically a feature of a "Proxy Web Server". I dont
think SUN One Web Server will do that. Now, Apache may be having a
proxy module embedded in it, which is allowing you to get the same
behavior.

In your DNS maps, do you have www host defined for domain.com domain,
pointing to your Host ?? If you do, then you dont have to worry about
what user uses to reach your server. However, if you have any Host
Header based Content Management/routing/serving rules then consider
this:
if the user types: http://domain.com, he will hit the WebServer. Change
the default  index page in such a way that it will send a redirect to
the user to http://www.domain.com/  etc., content.

If you are sensitive to what is coming in the Host header, have an
error page ( your logic that is expecting this to be there, can trigger
the error condition) that sends the user to the correct URL.

If you dont want to deal with all this, considering investing in a
Reverse Proxy Web Server.

HTH
-Dexthor.

0
Reply Dexthor 7/7/2006 12:43:47 PM

> In apache, it's easy to use "rewrite" in httpd.conf file. I don't know
> to to acheive this in Sun One web server.

Indeed. One of the biggest gripes I had about iPlanet/Sun ONE/whatever
webserver was the lack of functionality equivalent to mod_rewrite. But
there will be in the upcoming version 7 - see
http://blogs.sun.com/roller/page/elving?entry=regular_expression_redirects_in_7
for more information.

-Mark

0
Reply Mark 7/7/2006 1:09:37 PM

Mark wrote:
> > In apache, it's easy to use "rewrite" in httpd.conf file. I don't know
> > to to acheive this in Sun One web server.
>
> Indeed. One of the biggest gripes I had about iPlanet/Sun ONE/whatever
> webserver was the lack of functionality equivalent to mod_rewrite. But
> there will be in the upcoming version 7 - see
> http://blogs.sun.com/roller/page/elving?entry=regular_expression_redirects_in_7
> for more information.
>
> -Mark

Very cool. Thanks for Sharing. We were struggling on how to customize
HTTP 503 responses on 6.x. Sun came back and said, there is no way, coz
its hard coded. Hopefully this will be released soon and works well
with other SUN products ;)

-Dexthor.

0
Reply Dexthor 7/7/2006 1:24:29 PM

5 Replies
396 Views

(page loaded in 0.065 seconds)

Similiar Articles:













7/27/2012 6:08:24 AM


Reply: