Re: [web2py] Re: How to add a trailing slash in URL?

2015-05-06 Thread Francisco Costa
Tx Willoughby, I've accompished that with ​​ rewrite ^([^.]*[^/])$ $1/ permanent; but I don't think is a good solution for a SEO standpoint because the code will then have URLs without the trailling slash and every click will be redirected to the URL with the slash

Re: [web2py] Re: How to add a trailing slash in URL?

2015-05-05 Thread Willoughby
Well then how about a nasty reg-ex in the web server? Something like this for nginx: rewrite ^([^\?#]*/)([^\?#\./]+)([\?#].*)?$ $1$2/$3 permanent; http://www.nginxtips.com/add-trailing-slash-nginx/ On Tuesday, May 5, 2015 at 4:16:57 PM UTC-4, Francisco Costa wrote: > > nothing to explain, I just

Re: [web2py] Re: How to add a trailing slash in URL?

2015-05-05 Thread Francisco Tomé Costa
nothing to explain, I just want my URL's to finish with a trail (obviously excluding the ones with vars) Francisco Tomé Costa +351 918412636 <+351918412636> https://www.linkedin.com/in/franciscocosta​ On Tue, May 5, 2015 at 8:46 PM, Willoughby wrote: > Maybe if you explained what problem you're

Re: [web2py] Re: How to add a trailing slash in URL?

2015-05-05 Thread Willoughby
Maybe if you explained what problem you're trying to fix. On Tuesday, May 5, 2015 at 3:32:20 PM UTC-4, Francisco Costa wrote: > > I'm not saying changing all the URL's, but if there was an argument on the > URL() > > Something like this: URL(trailing=True) > > Francisco Tomé Costa > +351 9184126

Re: [web2py] Re: How to add a trailing slash in URL?

2015-05-05 Thread Francisco Tomé Costa
I'm not saying changing all the URL's, but if there was an argument on the URL() Something like this: URL(trailing=True) Francisco Tomé Costa +351 918412636 <+351918412636> https://www.linkedin.com/in/franciscocosta​ On Tue, May 5, 2015 at 8:06 PM, Leonel Câmara wrote: > What about stylesheets

[web2py] Re: How to add a trailing slash in URL?

2015-05-05 Thread Leonel Câmara
What about stylesheets and other files? Do you want their URL to be http://www.example.com/application/static/css/styles.css/ No and it won't work. Because a / denotes a directory. I guess you could do this using pattern based URL rewriting, I don't like it. -- Resources: - http://web2py.co

Re: [web2py] Re: How to add a trailing slash in URL?

2015-05-05 Thread Francisco Tomé Costa
My idea was to only add the trailing slash to the last argument (if any) or function. URLs with vars would look like this: http://www.example.com/application/controller/function/?foo=bar Francisco Tomé Costa +351 918412636 <+351918412636> https://www.linkedin.com/in/franciscocosta​ On Tue, May 5

[web2py] Re: How to add a trailing slash in URL?

2015-05-05 Thread Leonel Câmara
Why? This is a bad idea what about URLs that have vars? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscrib