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: Sun ONE directory server 5.2 installation problem - comp.sys.sun ...ERROR: Ldap authentication failed for url ldap://dcalabd10.domain.com ... Sun ONE directory server 5.2 installation problem - comp.sys.sun ... Sun ONE directory server 5 ... Sun one Web Server with SSL - comp.unix.solarisAlias with Sun One Web Server - comp.sys.sun.admin Sun's CORBA and ... POST request to SSL/HTTPS URL - comp.lang.java.programmer ... Sun one Web Server with SSL - comp.unix ... Remote access to Tomcat web server - comp.lang.java.programmer ...... different IP addresses in the target URL.It is useful to read the documentation associated with Apache Web Server. ... Sun one Web Server with SSL - comp.unix.solaris Alias ... POST request to SSL/HTTPS URL - comp.lang.java.programmer ...Sun one Web Server with SSL - comp.unix.solaris... Post Question ... and secure ... This program communicates with a server throw HTTP protocol with URL ... import com.sun ... SSL HostnameVerifier - comp.lang.java.securitySun one Web Server with SSL - comp.unix.solaris SSL HostnameVerifier - comp.lang ... for hostname verification. During handshaking, if the URL's hostname and the server's ... Web Services over SSL with Eclipse WTP - comp.lang.java.programmer ...... Connector in the Tomcat config file I get an error from Eclipse"URL not found ... Sun one Web Server with SSL - comp.unix.solaris... comp.lang.java.programmer ... javax.net.ssl.SSLHandshakeException - comp.lang.java.security ...com.sun.net.httpserver.HttpsServer - How To? - comp ... Found - comp.lang ..... different machines.Only one of the server ... POST request to SSL/HTTPS URL - comp.lang.java ... Sun JVM Applet prompts for Authentication - comp.lang.java ...... for data via a ASP webpage using openStream() of URL ... Is digest authentication mode turned on the web server? ... SUN JRE 1.5.0_06 client certificate selection problem on ... Performance comparison Solaris 8 versus Solaris 9 - comp.unix ...More info. is at www.sun.com/software/solaris ... SCSA President, Rite Online Inc. Voice: +1 (250) 979-1638 URL ... Here's one true story: I upgraded an Ultra 1 web server ... HTTPS from Java Application / Java Server - comp.lang.java ...Developing an SSL-Enabled Web Application With Sun Java System ..... J2EE 1.4 security in Sun Java ... communication between a Java client and an HTTPS server ... URL ... url rewrite in Sun Java Web server 6.1 (Walter Lee)Blogs.Oracle.Com - Walter Lee ... First, if you can use web 7.0u3, then please use web 7.0u3 because it has much better rewrite capability in rewrite, e.g. Regular Expression Redirects in Web Server 7 (elving's web server ...You're right, James, this blog entry was about redirecting, not URL rewriting. Fortunately, Sun Java System Web Server 7.0 can do URL rewriting, too. 7/27/2012 6:08:24 AM
|