Rewrite the URL

I have two pages search.cfm & searchResult.cfm. In the
search.cfm page, suppose that a dropdown of user names and submit
button. if select the user name(for exp. - Giriraj) then click the
submit button then we get the details of Giriraj user in the
searchResult.cfm page and the URL should be
http://localhost/CFTest/Giriraj.cfm
instead of
http://localhost/CFTest/searchResult.cfm?key=Giriraj

So you already have Giriraj.cfm created already? That would
mean that you would need a page for each id, which seems horribly
inefficient from a coding / maintenance point of view. I would
seriously reconsider that archetecture. But if for some reason you
are stuck with it, I can see 2 solutions:
1) Use javascript on your form to change the action attribute
of the form to something like this:
function checkSubmit() {
document.myform.action = "
http://localhost/cftest/" +
document.myform.key.value + ".cfm";
2) On SearchResult.cfm, use <cflocation> to relocate
the user to the correct page based on the value of the variable
"key"

Similar Messages

  • URL rewriting - rewriting the url to be pretty no possible?

    HI,
    I'm trying to rewrite a url for an Oracle portal site, in the following manner, eg:
    www.xyz.com/portal/page/portal/contact-us => www.xyz.com/contact-us
    I've been able to do the passing through, so that www.xyz.com/contact-us links through to the /portal/page/portal/contact-us with the following rules
    <VirtualHost *:7778>
    ServerName blahblah.xyz.com
    Port 7777
    DocumentRoot "/oracle/oas/SOMEFOLDER/Apache/Apache/htdocs"
    #DirectoryIndex labelled.htm
    Alias /developments/ "/oracle/share/SOMEFOLDER/developments/"
    Alias /attributes/ "/oracle/share/propertygenie/shared/attributes/"
    <snip Aliases.....>
    RewriteEngine on
    RewriteOptions inherit
    RewriteCond %{REQUEST_URI} !^/portal/page/portal/SOMETHING/.*$
    RewriteRule ^/(.*)$ /portal/page/portal/SOMETHING/$1 [PT]
    <SNIP .... />
    </VirtualHost>
    This is mirrored by a rule in config section. where /portal/page/portal/SOMETHING/ is replaced by /
    When i replace the RewriteCond with a rewrite rule, as follows, I get errors:
    RewriteRule ^/portal/page/portal/SOMETHING/(.*)$ /$1 [R]
    RewriteRule ^/(.*)$ /portal/page/portal/SOMETHING/$1 [PT]
    I would expect the above to rewrite the url if it starts with /portal/page/portal/SOMETHING/ and then pass it through on the backend.
    What am I doing wrong?
    Any assistance would be greatly appreciated.

    Haitham,
    There is more than one way to do this as per this link below, someone has already posted sometime ago on this forum.
    http://www.cisco.com/en/US/products/hw/contnetw/ps789/products_configuration_example09186a00801de8d6.shtml
    owner example
    content default-redirect
    port 80
    protocol tcp
    vip address 192.168.1.1
    url "www.example.com/*"
    redirect "www.example.com/test/home.htm"
    active
    thanks

  • How to Rewrite the URL

    When I use the mod_rewrite to change my URL http://www.domain/myapp/ to http://www.domain/, it didn't work.
    In my case I added some lines like this:
    RewriteEngine     on
    RewriteRule          ^/$     /myapp/ [R]
    and another way didn't work as well, like this:
    RewriteEngine on
    RewriteBase     /
    RewriteRule     ^myapp$     /myapp/ [R]
    What should I do?
    Thanks a lot!

    What you can do is to use a javascript to invoke the link. Assign the link to a javascript variable. Make sure the javascript varible is not in the URL rewrite javascript varible list in the adminConsole. This way the url will not be re-written.
    ie.
    <script language ="javascript">
    myUrl= "http://blah.html";
    function openThisUrl(thisUrl) {
    window.open(thisUrl);
    </script>
    <html>
    <a href = "javascript:void()" onClick="openThisUrl(myUrl)">Link</a>
    </html>

  • Can ACE rewrite the URL sent back to the browser?

    Hi,
    I want to know that if there is a link on a webpage, for example: www.test.com/folder1/folder2/index.html
    Would be it be possible to rewrite this so that when the webserver provides you with that page, that the ACE rewrites the given URL so that the browser only says in the URL bar: www.test.com
    Or is this impossible and would the webserver itself need to do this rewrite?
    Thanks!

    Hi Robin,
    As per my understanding, when you click on that link the URL would say www.test.com/folder1/folder2/index.html in URL bar. ACE can rewrite URL and forward to server or can modify server response but i am not sure if there's anyway you can get the URL change in the bar after you click on hyperlink and webpage loads. May be you can have redirection but not rewrite here.
    Regards,
    Kanwal

  • How to have ItemId in the URL in JSF based application

    I have a JSF based application and I am using faces-config.xml to navigate and I am using /redirect to navigate form case to case.
    The application lists products and upon selecting one, a product detail is displayed. I would like to have productId as part of the page URL so that URL can be emailed and the receiver can paste the received URL into browser and retrieve the product detail.
    Currently the URL is not rewritten to have session id in it.
    I am not ever sure where to start on this.

    Is this line correct?
    <value>#{param.productId}</value>
    Try it out yourself ;)
    This is clear and helpful. However I don't know how
    to create this URL
    (http://example.com/shop/products.jsf?productId=100)
    in the first place. The URL I have is in the form of
    http://example.com/shop/products.faces.
    Is adding '?productId=100' to the URL something
    configurable or it has to be done programmatically
    via URL rewriting?You can implement it in several ways:
    JSF<h:outputLink value="products.faces">
        <h:outputText value="click here" />
        <f:param name="productId" value="100" />
    </h:outputLink>
    <%-- or --%>
    <h:outputLink value="products.faces?productId=100">
        <h:outputText value="click here" />
    </h:outputLink>Or write a servlet listening on /shop/, scan the current request URI for product.faces, get the productId from the backing bean's session and rewrite the URL using request.getRequestDispatcher("product.faces?productId=" + productId).forward(request, response).
    Maybe there are more clever solutions using configfiles, but I don't have much experience (yet) with such GET request thingies in conjunction with JSF.

  • ACE rewrite embedded URL (Sun Web Server)

    I'm using the ACE to perform SSL offload infront of the servers. That is, clients talk 443, backend servers are 80.
    Is it possible to rewrite the URL's embedded withing a web page (inside javascript I think too) that is being generated by the server as http. I have gotten URL rewrite going, and it changes the 302 redirect, but not other URL in the payload.
    If not, is there a way to tell the Sun web server that it is being offloaded, and to generate https urls on port 80?
    (Server is Sun Messaging Suite Sun-Java-System-Web-Server/7.0)
    Regards,

    Not possible to change the embedded url on ACE.
    Unfortunately, I have no idea how to configure the Sun device.
    G.

  • ADF applicaiton enabling the URL rewriting - configure OHS

    Hi Experts,
    I am new to OHS and i have the following question about enabling the URL rewriting.
    We are planning to deploy the ADF fusion web application into the weblogic and place the OHS infront of the weblogic as the standard deployment architecture. In the web application the URL rewriting is enabled. Do we need to configure anything at the OHS side to work this URL rewriting? Or will the OHS supports this by default?
    Thanks.

    Weblogic has a module for OHS which takes care of simple requirements of forwarding.
    Entry in httpd.conf is something like this (i am using cluster):
    <IfModule mod_weblogic.c>
         WebLogicCluster 172.23.210.13:7003,172.23.210.22:7005
         MatchExpression /console
    </IfModule>
    mod_rewrite will be no different from normal. As in nothing special for ADF/Weblogic app server.
    Venkat

  • Is there a way to prevent chaging an application ID in the URL

    Environment
    APEX 3.1.00.09 on AIX 5.3
    I had a question posed to me from our middleware person concerning changing the URL by a user.
    We have an outward facing APEX application, say ID 100, that uses a reverse proxy inside the firewall to point to the actual server hosting the APEX application. When a user enters the URL given to them for this application the login screen pops up just as planned. When the user now types over the application number in the URL he is taken to the login screen of a different application hosted on that same server.
    The question is: How can I do either or both of the following:
    1- prevent the user from over-typing the application ID in the URL or
    2- when the user does type over the application ID he/she is redirected back to the desired application, in this case ID 100
    This is the only outward facing application we have at the moment but I can foresee more coming.
    Thanks very much in advance for your help.
    -gary

    Hi Scott and others
    Our Middleware Admin has some additional information and the same question. He is the expert on this project and I'm the messenger.
    <b>I've also forgotten the HTML tag to retain the spacing of his output. If someone will remind me I'll go back and put it in. Thx! :-) </b>
    ===============
    Issue: Need help in restricting access to single application URL
    Background/setup:
    We currently have the following setup in our environment and trying to expose a single URL to the internet.
    [Internet]-à[Firewall] -à [Apache Web Server as proxy] à [OHS + Apex running on same server]
    [SERVER1] [SERVER2]
    I have defined a virtual host on Apache Web Server residing on [SERVER1] which communicates with a virtual host defined on OHS on [SERVER2].
    When I try to access this URL ( http://servername.com/pls/apex/f?p=150:4) from outside it works fine, but if I change the number in the URL to (http://servername.com/pls/apex/f?p=160:5), it is exposing other applications. I tried to define some rewrite rules but they seem to be too restrictive or just don’t do the job.
    I was hoping if someone can help with me any valuable suggestions in getting past this issue. I masked some of the IP/server name information for security reasons.
    These are the error messages in the error_log which shows how the URL’s are being served:
    Error_log from proxy server [SERVER1]
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(109): proxy: HTTP: canonicalising URL //test.servername.com:7781/pls/apex/wwv_flow.accept
    [Fri Aug 14 13:01:03 2009] [debug] mod_proxy.c(459): Trying to run scheme_handler
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(1570): proxy: HTTP: serving URL http://test.servername.com:7781/pls/apex/wwv_flow.accept
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(228): proxy: HTTP connecting http://test.servername.com:7781/pls/apex/wwv_flow.accept to test.servername.com:7781
    [Fri Aug 14 13:01:03 2009] [debug] proxy_util.c(1139): proxy: HTTP: fam 2 socket created to connect to test.servername.com
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(377): proxy: socket is connected
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(411): proxy: connection complete to 192.168.21.80:7781 (test.servername.com)
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(1396): proxy: start body send
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(1456): proxy: end body send
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(109): proxy: HTTP: canonicalising URL //test.servername.com:7781/pls/apex/f
    [Fri Aug 14 13:01:03 2009] [debug] mod_proxy.c(459): Trying to run scheme_handler
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(1570): proxy: HTTP: serving URL http://test.servername.com:7781/pls/apex/f?p=150:4:815505233054690 -à I can change the highlighted value and go to a different app.
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(228): proxy: HTTP connecting http://test.servername.com:7781/pls/apex/f?p=150:4:815505233054690 to test.servername.com:7781
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(310): proxy: keepalive address match (keep original socket)
    [Fri Aug 14 13:01:03 2009] [info] [client 10.126.105.20] [3087d398] SSL0240I: SSL Handshake Failed, Socket has been closed.
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(1396): proxy: start body send
    [Fri Aug 14 13:01:03 2009] [debug] proxy_http.c(1456): proxy: end body send
    Access_log from the OHS server when I access the URL and login[SERVER2}
    10.126.105.12 - APEX_PUBLIC_USER [14/Aug/2009:13:01:03 -0400] "POST /pls/apex/wwv_flow.accept HTTP/1.1" 302 5 -à My rewrite rules seem to restrict this.
    10.126.105.12 - APEX_PUBLIC_USER [14/Aug/2009:13:01:03 -0400] "GET /pls/apex/f?p=150:4:815505233054690 HTTP/1.1" 200 7812
    10.126.105.12 - APEX_PUBLIC_USER [14/Aug/2009:13:01:49 -0400] "POST /pls/apex/wwv_flow.accept HTTP/1.1" 302 5à -à My rewrite rules seem to restrict this.
    10.126.105.12 - APEX_PUBLIC_USER [14/Aug/2009:13:01:49 -0400] "GET /pls/apex/f?p=150:3:815505233054690::NO HTTP/1.1" 200 50109
    Virtual Host Definitions:
    Proxy Server:[SERVER1]
    <VirtualHost *>
    ServerName servername.com
    ServerAlias servername
    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>
    ProxyRequests Off
    RewriteEngine on
    RewriteRule ^f?p([0-9][0-9][0-9])(:*)$ /pls/apex/f?p=150:4 [R,L]
    RewriteRule ^/$ /pls/apex/f?p=150:4 [R,L]
    ProxyPass /pls/apex http://test.servername.com:7781/pls/apex
    ProxyPassReverse /pls/apex http://test.servername.com:7781/pls/apex
    ProxyPass /i http://test.servername.com:7781/i/
    ProxyPassReverse /i http://test.servername.com:7781/i/
    ProxyPass /apex http://test.servername.com:7781/apex/
    ProxyPassReverse /apex http://test.servername.com:7781/apex/
    ProxyPreserveHost on
    RewriteEngine on
    </VirtualHost>
    OHS Server:[SERVER2]
    NameVirtualHost IPADDRESS:80
    <VirtualHost IPADDRESS:80>
    ServerName test.servername.com
    <IfModule mod_rewrite.so>
    RewriteRule ^pls/apex/f?p=([0-9][0-9][0-9]):(.*)$ /pls/apex/f?p=150:4 [L,R]
    </IfModule>
    </VirtualHost>
    =======================
    </code>

  • XMLConnector with Czech characters in the URL

    I'm writing a game that use the XMLConnector object to bring local xml data into a DataSet object.  My URL is, for example: data/quiz.xml.  I have everything working well.  But I'm localizing my game for Czech and Russian and when the game is installed to a path with Czech specific (high ascii) characters, the data import fails.  This is strange because the relative path (data/quiz.xml) doesn't change.  For example, my Czech install path contains the partial path: Vyšetřit Bobíčka.  If I just use normal English characters for this, I don't have a problem.  The swf is an embedded sprite in a Director game, but I don't think this is relevant.
    I looked into using fl.mapPlayerURL to format the path as UTF-8 but it doesn't look like this is the solution.  Another thing I thought of would be embed the xml data inside Flash and copy it to a temp folder when needed.  I'm using AS2.
    Any solutions or suggestions?
    Thanks in advance,
    Brian

    I've already solved this with Valentin's help.  I just convert the full XML
    file path to a DOS 8.3 path with baShortFileName and pass that to the Flash
    sprite.  It could be that CS4 or another work around will fix it also.
    Barring a complete rewrite, the XML files need to be external.  That's the
    way the Flash object works as far as I know.
    Thanks,
    Brian

  • Why my Dreamweaver CS6 encodes the URL php on MM_goToURL ?

    I have a problem with dreamweaver CS6 because when I use this function MM_goToURL, my dreamweaver encodes the php var, i don't know why, I have my preference well.. I don't know if it is a bug from dreamweaver. i'm using template form dreaweaver.
    this is a real code
    and later when I go to update the template look the url on the function MM_goToURL, this change dreamweaver CS6 encode it
    this doesn't happen on dreamweaver CS5, CS5.5, CS4.
    need some help with this please =).

    Check your Preferences.
    Ctrl + U or Cmd + U (on Mac OS) > Code Rewriting > Check URL encoding. Ensure it is set to 'Do not encode special characters'.

  • Rewrite PORTAL URL

    Hey ,
    I have a Strange Issue here . Our BI Production Landscape Consists of PORTAL and BI- ABAP ( CI + 2 App ) .
    The Hostname "bi.ril.com" is on DNS which POints to CI(ABAP) . There is a Web Dispatcher Configured on CI Which is Supposed to Route HTTP Requests to APP Servers for Load Balancing .
    Now , as per the LINK http://help.sap.com/saphelp_nw04s/helpdata/en/5f/7a343cd46acc68e10000000a114084/frameset.htm ,
    I have Performed the Mapping of URLs based on the SAP Logon Group and Request are getting ROuted to Application Servers.
    The Issue now is , When a HTTP Request goes to an APP Server the URL Generated is Somewhat like biapp##.ril.com which is Not on DNS .
    I can Put it on the DNS , but then the URL just wont be that Frindly . I am ready now the host these names on DNS .
    The Problem is , I want the CLIENT BROWSER to Display the URL as " bi.ril.com " , even though Internally it should be calling an APP Server .
    Is this EVEN Possible ???? I have Gone throught URL Rewriting , but then this feature only Rewrites the Prefixes and not the Entire URL .
    Regards,
    Ashish .A. Poojary
    Edited by: Ashish Poojary on Mar 28, 2011 8:38 AM

    Hi,
    The Issue now is , When a HTTP Request goes to an APP Server the URL Generated is Somewhat like biapp##.ril.com which is Not on DNS
    Do you speak of the URL generated from the web dispatcher to be sent to the app server ?
    If yes, I don't get this result on my system and I don't understand how you can get this.
    The URL sent to the appserver looks like http://appserver.domain.country/url
    The URL seen from the browser looks like https://webdispatcher.domain.country/url
    Regards,
    Olivier

  • Web Cal: Hostname Rewrite in URL

    Situation:
    When you access the web calendar and log on, ocas.fcgi generates a web page that redirects you to your calendar page. The target for the redirect uses the fully qualified hostname of the web server host in the target URL.
    That means, if you typed "https://host/calendar" into your browser you will be redirected (after log on) to "https://host.domain.tl/somewhere".
    Question:
    Can I disable this "feature" so that the hostname-part of the URL will not be rewritten with the fully qualified hostname?
    Background:
    The calendar web server is accessible from within the private LAN under one name and from outside the LAN under a different name (NAT!). So hostname-rewrite is always wrong in one of both cases.
    Any solutions? TIA!

    We just upgraded to Web Calendar 9.0.4 and have a similar configuration, and are experiencing the same issue. Have posted a TAR with Oracle, and are awaiting a response. Will post another reply here when the issue is resolved. Would hate to have to use the same FQDN externally as internally, although that would most likely resolve the issue.

  • Rewrite of URL

    With Gateway implementation, the url has been rewritten to
    https://abc.com.sg//manager .... instead of
    https://abc/com.sg/http:/internal.com.sg/manager. Is there a way to
    configure iPlanet Portal to rewrite //manager to
    http://internal.com.sg/manager
    Rgds
    Veronica

    Looks like the uri is not getting rewritten properly, need more
    information on the source of the page to say why it is not being
    rewritten ..
    what version of portal are u using ?
    You may wanna copy the source and paste here before it is getting
    written and after it is getting written ..
    Karthik !
    Veronica Oh wrote:
    With Gateway implementation, the url has been rewritten to
    https://abc.com.sg//manager .... instead of
    https://abc/com.sg/http:/internal.com.sg/manager. Is there a way to
    configure iPlanet Portal to rewrite //manager to
    http://internal.com.sg/manager
    Rgds
    Veronica

  • Encoding the URL request

    Could you plz assist me how encode the URL request that is getting from the client.The query about discarding a session is as follows
    (1)What will happened when employing invalidate() method of a session.
    (2) What is the distinguishing of invalidate() and logout if both has performed that all of the user's session will have been expired if we invoke anyone

    Making some guesses here.
    The invalidate() method does what it says: it invalidates the session. Most HttpSessionMethods will throw an IllegalStateException if called on an invalid session.
    There is no method or event that causes a "logout". It's something you have to do programmatically using the invalidate() method. Or the session could timeout in which case also it becomes invalid ( which is basically done by the container as opposed to you calling invalidate() )
    About URL encoding: do you mean URL rewriting which appends a session id to the URL to be used in case cookies are disabled? Then you need encodeURL() and encodeRedirectURL(). Working with the session with rewriting of URLs is exactly the same for you ( in your code ) as it is normally.
    If you mean making a safe URL, you need URLEncoder: http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLEncoder.html
    I hope I got something right here.

  • Change the URL path for CQ?

    How do you change the base URL so that /content/geometrixx/en does not show up in the URL?  If www.geometrixx.com was the URL how do you make it so that /conent/geometrixx/en does not show up in the URL for the homepage?

    How do you currently distingush between your desktop site and your mobile site? Is it based on host name?
    If you have two different sites that are distingushed by host name you can't solve that problem with the JCR Resource resolver. You have two choices:
    Use Apache mod_rewrite to do the rewrites at the Apache layer. With mod_rewrite you can use the host name as part of your rule definition and map the host names to the correct paths.
    Use the /etc/map approach to configuring the resource resolver - you can see that documentation at https://cwiki.apache.org/SLING/flexible-resource-resolution.html- this will allow you to configure different resource resolution based on request data.
    Paul McMahon

Maybe you are looking for