Topic
11 replies Latest Post - ‏2012-05-02T15:49:41Z by Sunit
SystemAdmin
SystemAdmin
3908 Posts
ACCEPTED ANSWER

Pinned topic URL Redirection....

‏2007-10-30T16:26:24Z |
Hi,

I am trying to redirecting URL "www.goshti.com/vividh" to new url say "www.example.com".

I have confiure below Redirect rule in httpd.conf

Redirect /* www.example.com
Redirect http:/www.goshti.com/vividh http:/www.example.com

The "www.goshti.com/vividh" is websphere application and plug-in with http server.

Now I want to access above application url (www.goshti.com/vividh) using new URL say "www.example.com".

www.goshti.com/vividh
redirecting
www.example.com (new url)

I assume I can do that with the Rewriterule, but I can't seem to figure it out. It seems that we are using websphere-plugin so for that reason it is not redirecting to new url.

Please provide any suggestions to work out???
Thanks in Advanced.
Updated on 2012-05-02T15:49:41Z at 2012-05-02T15:49:41Z by Sunit
  • SystemAdmin
    SystemAdmin
    3908 Posts
    ACCEPTED ANSWER

    Re: URL Redirection....

    ‏2007-10-30T16:50:08Z  in response to SystemAdmin
    mnsh_waghmare@yahoo.com wrote:
    > Hi,
    >
    > I am trying to redirecting URL "www.goshti.com/vividh" to new url say "www.example.com".
    >
    > I have confiure below Redirect rule in httpd.conf
    >
    > Redirect /* www.example.com
    > Redirect http:/www.goshti.com/vividh http:/www.example.com
    >
    > The "www.goshti.com/vividh" is websphere application and plug-in with http server.
    >
    > Now I want to access above application url (www.goshti.com/vividh) using new URL say "www.example.com".
    >
    > www.goshti.com/vividh
    redirecting
    www.example.com (new url)
    >
    > I assume I can do that with the Rewriterule, but I can't seem to figure it out. It seems that we are using websphere-plugin so for that reason it is not redirecting to new url.
    >
    > Please provide any suggestions to work out???
    > Thanks in Advanced.

    http://publib.boulder.ibm.com/httpserv/ihsdiag/plugin_alter_uri.html
  • Farrukh_Naeem
    Farrukh_Naeem
    2 Posts
    ACCEPTED ANSWER

    Re: URL Redirection....

    ‏2009-02-25T04:36:20Z  in response to SystemAdmin
    Do this by installing just 1 WebServer and Federate it to WebSphere Application Server
    It is tested using WAS and WEB Server 6.0 Win XP and LINUX

    ###################################################
      • HOST FILE EDIT-------############

    1. Copyright (c) 1993-1999 Microsoft Corp.
    #
    1. This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    1. This file contains the mappings of IP addresses to host names. Each
    2. entry should be kept on an individual line. The IP address should
    3. be placed in the first column followed by the corresponding host name.
    4. The IP address and the host name should be separated by at least one
    5. space.
    #
    1. Additionally, comments (such as these) may be inserted on individual
    2. lines or following the machine name denoted by a '#' symbol.
    #
    1. For example:
    #
    1. 102.54.94.97 rhino.acme.com # source server
    2. 38.25.63.10 x.acme.com # x client host
    127.0.0.1 localhost

      • WEB SERVER NAME e.g
    192.168.7.61 wp6host.training.ibm.com

    1. Enter Different Names for Web Server which will be used e.g
    192.168.7.61 facebook
    192.168.7.61 google
    #####################################################
      • edit httpd.conf--------##############

    1. Uncomment following Module line which will be in the list
    LoadModule rewrite_module modules/mod_rewrite.so

    2.Uncomment " NameVirtualHost * " entry and edit it in the format as follows
    NameVirtualHost Your_WebServer_Name:Listner_Port_YourWebserver

    e.g NameVirtualHost wp6host.training.ibm.com:80

    3. Add the following Stanza and #ABCDEF is to Describe the Detail what line do ,
    it is not part of Stanza. this way you can add N Nubers of virtual Host Entries

    1. First Redirection
    <VirtualHost wp6host.training.ibm.com:80> # I entered my Web Server_Name & Port
    ServerName google # as in host file i entered rizwan
    DocumentRoot "C:/Program Files/IBM HTTP Server/htdocs/en_US" #Enter your htdocs Path based on linux/windows
    RewriteEngine on # It is used to activate module
    RewriteRule ^/(.*) http://www.google.com R,L #Just Change your web site address e.g facebook.com
    </VirtualHost>
    1. Second Stanza for Redirection
    <VirtualHost wp6host.training.ibm.com:80> # I entered my Web Server_Name & Port
    ServerName facebook # as in host file i entered rizwan
    DocumentRoot "C:/Program Files/IBM HTTP Server/htdocs/en_US" #Enter your htdocs Path based on linux/windows
    RewriteEngine on # It is used to activate module
    RewriteRule ^/(.*) http://www.facebook.com R,L #Just Change your web site address e.g facebook.com
    </VirtualHost>

    4. After this Restart your Web Server

    ###################################################
    ############---------How to test it-----------#########

    1. if your browser is using proxy setting then enter "google" and "facebook" in the "by pass proxy server"

    Entry in Proxy by Pass For Win XP
    tools->internetoption->connectionsettings->LAN Settings-> if Use Proxy is checked ->advance->add entries of google and facebook

    2. Just enter http://google <=Enter Your web Server will redirect your request to www.google.com
    3. in 2nd browser Just enter http://facebook <=Enter Your web Server will redirect your request to www.facebook.com
  • Farrukh_Naeem
    Farrukh_Naeem
    2 Posts
    ACCEPTED ANSWER

    Re: URL Redirection....

    ‏2009-02-25T04:48:24Z  in response to SystemAdmin
    Do this by installing just 1 WebServer and Federate it to WebSphere Application Server
    It is tested using WAS and WEB Server 6.0 Win XP and LINUX

    ###HOST FILE EDIT
    127.0.0.1 localhost
    #WEB SERVER NAME e.g
    192.168.7.61 wp6host.training.ibm.com
    #Enter Different Names for Web Server which will be used e.g
    192.168.7.61 facebook
    192.168.7.61 google
    #edit httpd.conf#

    1. Uncomment following Module line which will be in the list
    LoadModule rewrite_module modules/mod_rewrite.so

    2.Uncomment " NameVirtualHost * " entry and edit it in the format as follows
    NameVirtualHost Your_WebServer_Name:Listner_Port_YourWebserver
    e.g NameVirtualHost wp6host.training.ibm.com:80

    3. Add the following Stanza and #ABCDEF is to Describe the Detail what line do ,
    it is not part of Stanza. this way you can add N Nubers of virtual Host Entries

    #First Redirection
    <VirtualHost wp6host.training.ibm.com:80> # I entered my Web Server_Name & Port
    ServerName google # as in host file i entered rizwan
    DocumentRoot "C:/Program Files/IBM HTTP Server/htdocs/en_US" #Enter your htdocs Path based on linux/windows
    RewriteEngine on # It is used to activate module
    RewriteRule ^/(.*) http://www.google.com R,L #Just Change your web site address e.g facebook.com
    </VirtualHost>

    1. Second Stanza for Redirection
    <VirtualHost wp6host.training.ibm.com:80> # I entered my Web Server_Name & Port
    ServerName facebook # as in host file i entered rizwan
    DocumentRoot "C:/Program Files/IBM HTTP Server/htdocs/en_US" #Enter your htdocs Path based on linux/windows
    RewriteEngine on # It is used to activate module
    RewriteRule ^/(.*) http://www.facebook.com R,L #Just Change your web site address e.g facebook.com
    </VirtualHost>

    4. After this Restart your Web Server

    #How to test it#

    1. if your browser is using proxy setting then enter "google" in the "by pass proxy server"

    2. Just enter http://google <=Enter Your web Server will redirect your request to www.google.com

    3. Just enter http://facebook <=Enter Your web Server will redirect your request to www.facebook.com
  • venkatapraveen
    venkatapraveen
    3 Posts
    ACCEPTED ANSWER

    Re: URL Redirection....

    ‏2011-06-13T12:31:40Z  in response to SystemAdmin
    Hi Guys,

    I had a similar requirement with the Websphere and httpserver.

    I had followd the same steps and tried to workout but in my case it is
    not working. can u please help me out for solving this issue..
    Thanks in advance!!

    Praveen..
    • SystemAdmin
      SystemAdmin
      3908 Posts
      ACCEPTED ANSWER

      Re: URL Redirection....

      ‏2011-12-25T07:51:40Z  in response to venkatapraveen
      Hi,
      Is your issue resolved. I also need to redirect a request coming into my IBM httpserver.
      Please let me know , if you were able to solve this issue.

      Regards,
      Abhay
    • SystemAdmin
      SystemAdmin
      3908 Posts
      ACCEPTED ANSWER

      Re: URL Redirection....

      ‏2011-12-25T07:51:49Z  in response to venkatapraveen
      Hi,
      Is your issue resolved. I also need to redirect a request coming into my IBM httpserver.
      Please let me know , if you were able to solve this issue.

      Regards,
      Abhay
  • venkatapraveen
    venkatapraveen
    3 Posts
    ACCEPTED ANSWER

    Re: URL Redirection....

    ‏2011-12-27T04:51:49Z  in response to SystemAdmin
    Hi

    I followed these steps for acheiving my task to be done..

    Url Configuration
    These are the steps to be followed for redirecting the maximo login page scrren to the client requested login page.
    For Ex: http://maximo.clientname.com it should redirect to our login page.
    For this we need to do the following changes in the DNS and as well as in our application.
    We need to map the ip in the DNS like
    Give the ip address where the application is running and give the name as of your wish
    In this case I gave maximo as the name and CLIENTNAME.com is the domain of the organization.
    After that u should be able to login like http://maximo.shoppersstop.com/maximo .
    Without entering maximo at the end we need to add one permanent redirection rule in the Httpd.conf File.

    Please find below detailed steps on how this can be configured. Make sure you have a back up of the httpd.conf before making any changes.
    Edit the httpd.conf file as follows:

    Find the following line:

    Redirect permanent /foo http://www.example.com/bar

    Underneath that line, place:
    RedirectMatch permanent ^/$ http://sysname/maximo

    Restart webserver1

    Thanks&Regards:

    Praveen.P
  • simlu_23
    simlu_23
    2 Posts
    ACCEPTED ANSWER

    Re: URL Redirection....

    ‏2012-05-02T11:30:16Z  in response to SystemAdmin
    Hi,

    I need ur help on redirecting the url with one port to another.

    For Example :
    want to redirect the following port
    'http://example:9080/itim/console'
    to
    'http://example:9082/itim/console'

    Both the tim instance are configured on the single server with two different webserver profile.

    Port 9080 - configured on the first profile
    Port 9082 - configured on the second profile

    The WAS version - 7.
    Please help me on this.
  • simlu_23
    simlu_23
    2 Posts
    ACCEPTED ANSWER

    Re: URL Redirection....

    ‏2012-05-02T11:30:24Z  in response to SystemAdmin
    Hi,

    I need ur help on redirecting the url with one port to another.

    For Example :
    want to redirect the following port
    'http://example:9080/itim/console'
    to
    'http://example:9082/itim/console'

    Both the tim instance are configured on the single server with two different webserver profile.

    Port 9080 - configured on the first profile
    Port 9082 - configured on the second profile

    The WAS version - 7.
    Please help me on this.
    • Sunit
      Sunit
      182 Posts
      ACCEPTED ANSWER

      Re: URL Redirection....

      ‏2012-05-02T15:49:41Z  in response to simlu_23
      If you have two profiles created on the same physical server, with application server in each listening on 9080 and 9082, you should be able to access ITIM application on each of the servers. Why do you need to redirect traffic from one to the other?

      If you want the traffic to be load balanced across both the servers then put IHS in fron of it.

      Redirection in this case, if required, will have to be handled by the ITIM application. It is the WAS instance that is listening on these ports and not IHS (which this forum is about).

      • Sunit
  • venkatapraveen
    venkatapraveen
    3 Posts
    ACCEPTED ANSWER

    Re: URL Redirection....

    ‏2012-05-02T12:25:01Z  in response to SystemAdmin
    Hi Simlu..
    HAd u tried following the steps mentioned.

    If so let me know where you are getting the error/problem.

    Otherwise try following the steps mentioned and let me know.
    Thanks&Regards:
    Praveen.P