Users - Configuration of Url

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - Configuration of Url

G Venkata Phanindra
Hi
       I want to create a Webstore (Website) and i want the url patterns to be as Follows
             1 www.xyz.com  but i get by default with ofbiz as www.xyz.com/control/main i want to get rid of this.
            2 I want to customize few sections of urls Like
                 for information link i want them to be
                  www.xyz.com/info/abc
                 i am getting by default in ofbiz as
                 www.xyz.com/control/info/abc........
          
Thanks and Regards
G Venkata Phanindra.   
            


With Regards,

G Venkata Phanindra.
Mobile :9849852989.


Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Configuration of Url

Andrew Sykes
Hi,

The /control part is actually a servlet which does all the request
handling, so I'm not sure that it's possible to get rid of it easily.

However, in production if you are using OfBiz in conjunction with Apache
Server, you can simply use mod_rewrite to transform the URLs.

On Fri, 2006-04-28 at 09:40 +0100, G Venkata Phanindra wrote:

> Hi
>        I want to create a Webstore (Website) and i want the url
> patterns to be as Follows
>              1 www.xyz.com  but i get by default with ofbiz as
> www.xyz.com/control/main i want to get rid of this.
>             2 I want to customize few sections of urls Like
>                  for information link i want them to be
>                   www.xyz.com/info/abc
>                  i am getting by default in ofbiz as
>                  www.xyz.com/control/info/abc........
>            
> Thanks and Regards
> G Venkata Phanindra.    
>              
>
>
> With Regards,
>
> G Venkata Phanindra.
> Mobile :9849852989.
>
>
>
> ______________________________________________________________________
> Jiyo cricket on Yahoo! India cricket
> Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
>  _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Configuration of Url

Jacques Le Roux
Administrator
In reply to this post by G Venkata Phanindra
The best way to do this is to put Apache in front using mod_jk. Search in Wiki please.
 
Jacques
----- Original Message -----
Sent: Friday, April 28, 2006 10:40 AM
Subject: [OFBiz] Users - Configuration of Url

Hi
       I want to create a Webstore (Website) and i want the url patterns to be as Follows
             1 www.xyz.com  but i get by default with ofbiz as www.xyz.com/control/main i want to get rid of this.
            2 I want to customize few sections of urls Like
                 for information link i want them to be
                  www.xyz.com/info/abc
                 i am getting by default in ofbiz as
                 www.xyz.com/control/info/abc........
          
Thanks and Regards
G Venkata Phanindra.   
            


With Regards,

G Venkata Phanindra.
Mobile :9849852989.


Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.



_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Configuration of Url

David E. Jones

That would be one way... But you can also change the mount point of the ControlServlet in the web.xml file and all dynamically generated URLs (ie using the ofbizUrl tag) will pick it up automatically. Quite a few OFBiz-based ecommerce sites do this.

-David


Jacques Le Roux wrote:

> The best way to do this is to put Apache in front using mod_jk. Search
> in Wiki please.
>  
> Jacques
>
>     ----- Original Message -----
>     *From:* G Venkata Phanindra <mailto:[hidden email]>
>     *To:* developers Forums <mailto:[hidden email]> ; ofbiz
>     <mailto:[hidden email]>
>     *Sent:* Friday, April 28, 2006 10:40 AM
>     *Subject:* [OFBiz] Users - Configuration of Url
>
>     Hi
>            I want to create a Webstore (Website) and i want the url
>     patterns to be as Follows
>                  1 www.xyz.com <http://www.xyz.com>  but i get by
>     default with ofbiz as www.xyz.com/control/main
>     <http://www.xyz.com/control/main> i want to get rid of this.
>                 2 I want to customize few sections of urls Like
>                      for information link i want them to be
>                       www.xyz.com/info/abc <http://www.xyz.com/info/abc>
>                      i am getting by default in ofbiz as
>                      www.xyz.com/control/info/abc........
>              
>     Thanks and Regards
>     G Venkata Phanindra.  
>                
>
>
>     With Regards,
>
>     G Venkata Phanindra.
>     Mobile :9849852989.
>
>     ------------------------------------------------------------------------
>     Jiyo cricket on Yahoo! India cricket
>     <http://us.rd.yahoo.com/mail/in/mailcricket/*http://in.sports.yahoo.com/cricket/>
>     Yahoo! Messenger Mobile
>     <http://us.rd.yahoo.com/mail/in/mailmobilemessenger/*http://in.mobile.yahoo.com/new/messenger/>
>     Stay in touch with your buddies all the time.
>
>     ------------------------------------------------------------------------
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email]
>     http://lists.ofbiz.org/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Configuration of Url

Andrew Sykes
David,

Surely that's still going to leave some name in the URL.

The desired effect was mydomain.com/main

If you rename the control servlet aren't you always going to have
something of the form...
mydomain.com/<some_name>/main


On Fri, 2006-04-28 at 10:42 +0100, David E Jones wrote:

> That would be one way... But you can also change the mount point of the ControlServlet in the web.xml file and all dynamically generated URLs (ie using the ofbizUrl tag) will pick it up automatically. Quite a few OFBiz-based ecommerce sites do this.
>
> -David
>
>
> Jacques Le Roux wrote:
> > The best way to do this is to put Apache in front using mod_jk. Search
> > in Wiki please.
> >  
> > Jacques
> >
> >     ----- Original Message -----
> >     *From:* G Venkata Phanindra <mailto:[hidden email]>
> >     *To:* developers Forums <mailto:[hidden email]> ; ofbiz
> >     <mailto:[hidden email]>
> >     *Sent:* Friday, April 28, 2006 10:40 AM
> >     *Subject:* [OFBiz] Users - Configuration of Url
> >
> >     Hi
> >            I want to create a Webstore (Website) and i want the url
> >     patterns to be as Follows
> >                  1 www.xyz.com <http://www.xyz.com>  but i get by
> >     default with ofbiz as www.xyz.com/control/main
> >     <http://www.xyz.com/control/main> i want to get rid of this.
> >                 2 I want to customize few sections of urls Like
> >                      for information link i want them to be
> >                       www.xyz.com/info/abc <http://www.xyz.com/info/abc>
> >                      i am getting by default in ofbiz as
> >                      www.xyz.com/control/info/abc........
> >              
> >     Thanks and Regards
> >     G Venkata Phanindra.  
> >                
> >
> >
> >     With Regards,
> >
> >     G Venkata Phanindra.
> >     Mobile :9849852989.
> >
> >     ------------------------------------------------------------------------
> >     Jiyo cricket on Yahoo! India cricket
> >     <http://us.rd.yahoo.com/mail/in/mailcricket/*http://in.sports.yahoo.com/cricket/>
> >     Yahoo! Messenger Mobile
> >     <http://us.rd.yahoo.com/mail/in/mailmobilemessenger/*http://in.mobile.yahoo.com/new/messenger/>
> >     Stay in touch with your buddies all the time.
> >
> >     ------------------------------------------------------------------------
> >
> >
> >     _______________________________________________
> >     Users mailing list
> >     [hidden email]
> >     http://lists.ofbiz.org/mailman/listinfo/users
> >
> >
> > ------------------------------------------------------------------------
> >
> >  
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Configuration of Url

G Venkata Phanindra
Hi thanks for your reply.....
       But i am unable to implement the sugestion from Mr.David.
    I changed the following lines of code in web.xml
       <servlet-mapping>
        <servlet-name>ControlServlet</servlet-name>
        <url-pattern>/control/*</url-pattern>
    </servlet-mapping>     
to
    <servlet-mapping>
        <servlet-name>ControlServlet</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>     
and also i changed in the index.jsp
 <%response.sendRedirect("control/main");%>
 to
<%response.sendRedirect("/main");%>
<%response.sendRedirect("/");%>
etc.......
I am getting following error
 404 at times
 and some times Unable to load the requested url and its going to infinate loop and the error/error.jsp is comming up......

Phani



Andrew Sykes <[hidden email]> wrote:
David,

Surely that's still going to leave some name in the URL.

The desired effect was mydomain.com/main

If you rename the control servlet aren't you always going to have
something of the form...
mydomain.com//main


On Fri, 2006-04-28 at 10:42 +0100, David E Jones wrote:

> That would be one way... But you can also change the mount point of the ControlServlet in the web.xml file and all dynamically generated URLs (ie using the ofbizUrl tag) will pick it up automatically. Quite a few OFBiz-based ecommerce sites do this.
>
> -David
>
>
> Jacques Le Roux wrote:
> > The best way to do this is to put Apache in front using mod_jk. Search
> > in Wiki please.
> >
> > Jacques
> >
> > ----- Original Message -----
> > *From:* G Venkata Phanindra
> > *To:* developers Forums ; ofbiz
> >
> > *Sent:* Friday, April 28, 2006 10:40 AM
> > *Subject:* [OFBiz] Users - Configuration of Url
> >
> > Hi
> > I want to create a Webstore (Website) and i want the url
> > patterns to be as Follows
> > 1 www.xyz.com but i get by
> > default with ofbiz as www.xyz.com/control/main
> > i want to get rid of this.
> > 2 I want to customize few sections of urls Like
> > for information link i want them to be
> > www.xyz.com/info/abc
> > i am getting by default in ofbiz as
> > www.xyz.com/control/info/abc........
> >
> > Thanks and Regards
> > G Venkata Phanindra.
> >
> >
> >
> > With Regards,
> >
> > G Venkata Phanindra.
> > Mobile :9849852989.
> >
> > ------------------------------------------------------------------------
> > Jiyo cricket on Yahoo! India cricket
> >
> > Yahoo! Messenger Mobile
> >
> > Stay in touch with your buddies all the time.
> >
> > ------------------------------------------------------------------------
> >
> >
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
--
Kind Regards
Andrew Sykes
Sykes Development Ltd
http://www.sykesdevelopment.com


_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users



With Regards,

G Venkata Phanindra.
Mobile :9849852989.


Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Configuration of Url

Andrew Sykes
On Fri, 2006-04-28 at 11:19 +0100, G Venkata Phanindra wrote:

Just to clarify,
>         something of the form...
>         mydomain.com//main

should read

something of the form...
mydomain.com/new_control_servlet_name/main

Phani, I'm not sure that it's possible to mount the control servlet on /
as this would seem to conflict with the mount point of the application.

URLs generally take the form

/application_mount_point/control_servlet_name/request

Of course I could be wrong!
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Configuration of Url

Pradeep Sharma-3
In reply to this post by G Venkata Phanindra
Hi,

To customize this URL, you might want to make changes at three places in web.xml file of you application:

1. In the "allowedPaths" init-param: Change the name of control to something you would like to have.

2. In the "redirectPath" init-param: Change this path from /control/main to /info/main (As you would like to have info in place of control).

3. Change
   <servlet-mapping>
        <servlet-name>ControlServlet</servlet-name>
        <url-pattern>/control/*</url-pattern>
    </servlet-mapping> 

to

    <servlet-mapping>
        <servlet-name>ControlServlet</servlet-name>
        <url-pattern>/info/*</url-pattern>
    </servlet-mapping>

I hope this will work for you.

Best regards,
Pradeep Sharma

 
On 4/28/06, G Venkata Phanindra <[hidden email]> wrote:
Hi
       I want to create a Webstore (Website) and i want the url patterns to be as Follows
             1 <a href="http://www.xyz.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> www.xyz.com  but i get by default with ofbiz as <a href="http://www.xyz.com/control/main" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.xyz.com/control/main i want to get rid of this.
            2 I want to customize few sections of urls Like
                 for information link i want them to be
                  <a href="http://www.xyz.com/info/abc" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> www.xyz.com/info/abc
                 i am getting by default in ofbiz as
                 <a href="http://www.xyz.com/control/info/abc......" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> www.xyz.com/control/info/abc........
          
Thanks and Regards
G Venkata Phanindra.   
            


With Regards,

G Venkata Phanindra.
Mobile :9849852989.


Jiyo cricket on <a href="http://us.rd.yahoo.com/mail/in/mailcricket/*http://in.sports.yahoo.com/cricket/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Yahoo! India cricket
<a href="http://us.rd.yahoo.com/mail/in/mailmobilemessenger/*http://in.mobile.yahoo.com/new/messenger/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Yahoo! Messenger Mobile Stay in touch with your buddies all the time.



_______________________________________________
Users mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.ofbiz.org/mailman/listinfo/users" target="_blank">http://lists.ofbiz.org/mailman/listinfo/users



 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users