Thanks guys....

So Sid, I was thinking this is a problem with symfony routing that it
doesn't handle dots...but the problem actually lies at Apache layer
where it doesn't pass along the parameters correctly to the routing
layer of symfony...right?

If I write rule for
URL - http://www.example.com/string.with.dots/file.html
Rule -
dotted_rule:
  url: /:param1/:fileName

Then value of param1 is not received correctly as "string.with.dots"

If this problem can get solved by the apache rule, as you have said, I
won't need to do any special handling or encoding of the dots... :)

Lee, the URL encoding functions don't handle the dot...I believe it's
primarily because the dot has an important place in URL...just that
it's not taken kindly if it's in between the URL instead of at the
end, (for defining a file extension)...

Gunnar, yeah, as you've said, changing routing structure is a costly
affair, especially when Google (and others) have indexed and
bookmarked your URL's...

On Dec 4, 2:06 am, "Gunnar Lium" <[EMAIL PROTECTED]> wrote:
> Although not always possible or desirable, you can also get around this
> problem by creating urls with ?. For example
> somedomain.com/profiles/[EMAIL PROTECTED]
> 2008/12/3 Sid Bachtiar <[EMAIL PROTECTED]>
>
>
>
> > Hi,
>
> > I've had problem with this too. I don't know any general solution to
> > this problem.
>
> > For my case, I needed the dot because I was passing email address in
> > the URL. So I solved it by adding one line (the line with @) in the
> > web/,htaccess
>
> >  # we skip all files with .something
> >  RewriteCond %{REQUEST_URI} \..+$
> >  RewriteCond %{REQUEST_URI} [EMAIL PROTECTED]
> >  RewriteCond %{REQUEST_URI} !\.html$
> >  RewriteRule .* - [L]
>
> > The one added line in the htaccess basically detect if the URL
> > contains @ character, if so it will be passed to the controller
> > instead of handled as a file like images, css, js, etc.
>
> > On Thu, Dec 4, 2008 at 12:25 AM, Sumedh <[EMAIL PROTECTED]> wrote:
>
> > > Hi Friends,
>
> > > How is one supposed to handle a URL having a dot ('.')?
>
> > > For example,http://www.example.com/string.with.dots/file.html
>
> > > The urlencode() function from PHP doesn't handle dots...and the
> > > routing rules break for these kind of URL's...
>
> > > So, how should they be taken care of? Is there some standardized way
> > > that everyone uses?
>
> > > - Thanks in advance,
> > > Sumedh
>
> > --
> > Visit my website:http://onlinesid.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to