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} !@.+$
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.
Although not always possible or desirable, you can also get around this
problem by creating urls with ?. For example
somedomain.com/profiles/unsuscribe?email=someem...@anotherdomain.com.
2008/12/3 Sid Bachtiar <sid.bacht...@gmail.com>
> 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} !@.+$
> 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 <sumedh.inam...@gmail.com> wrote:
> > Hi Friends,
> > How is one supposed to handle a URL having a dot ('.')?
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?
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" <gunnarl...@gmail.com> wrote:
> Although not always possible or desirable, you can also get around this
> problem by creating urls with ?. For example
> somedomain.com/profiles/unsuscribe?email=someem...@anotherdomain.com.
> 2008/12/3 Sid Bachtiar <sid.bacht...@gmail.com>
> > 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} !@.+$
> > 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 <sumedh.inam...@gmail.com> wrote:
> > > Hi Friends,
> > > How is one supposed to handle a URL having a dot ('.')?
On Thu, Dec 4, 2008 at 6:56 PM, Sumedh <sumedh.inam...@gmail.com> wrote:
> 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?
> 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" <gunnarl...@gmail.com> wrote:
>> Although not always possible or desirable, you can also get around this
>> problem by creating urls with ?. For example
>> somedomain.com/profiles/unsuscribe?email=someem...@anotherdomain.com.
>> 2008/12/3 Sid Bachtiar <sid.bacht...@gmail.com>
>> > 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} !@.+$
>> > 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 <sumedh.inam...@gmail.com> wrote:
>> > > Hi Friends,
>> > > How is one supposed to handle a URL having a dot ('.')?
So, it doesn't contain something like '@' by which I can identify a
URL that is NOT to be skipped...
How do I handle this case? Ideally,
I would want the dots to be handled just like normal characters...what
if just remove the section from Symfony .htaccess that skips URL's
with dots, with exception to .HTML? Will it create a problem for other
kinda files? What's the problem if the request is handed over to
controller in all cases? May be this is a foolish question...but
honestly, it's not very clear to me...
On Dec 4, 11:16 am, "Sid Bachtiar" <sid.bacht...@gmail.com> wrote:
> The problem is with Symfony's .htaccess. Not in Symfony's controller
> nor in Symfony routing. Just in .htaccess.
> In a way this is a Symfony 'shortcoming'
> > 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... :)
> You can't really encode the dots (I think), otherwise we won't have
> this problem.
> On Thu, Dec 4, 2008 at 6:56 PM, Sumedh <sumedh.inam...@gmail.com> wrote:
> > 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?
> > 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" <gunnarl...@gmail.com> wrote:
> >> Although not always possible or desirable, you can also get around this
> >> problem by creating urls with ?. For example
> >> somedomain.com/profiles/unsuscribe?email=someem...@anotherdomain.com.
> >> 2008/12/3 Sid Bachtiar <sid.bacht...@gmail.com>
> >> > 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
> >> > 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 <sumedh.inam...@gmail.com> wrote:
> >> > > Hi Friends,
> >> > > How is one supposed to handle a URL having a dot ('.')?
> What's the problem if the request is handed over to
> controller in all cases? May be this is a foolish question...but
> honestly, it's not very clear to me...
Well, some URL are not for the controller. for example:
images/something.gif or css/style.css or js/script.js
I think it is better to add a rule that suits your situation than to
try to handle all cases.
Identify a pattern in your URL and add a rule to detect it.
> So, it doesn't contain something like '@' by which I can identify a
> URL that is NOT to be skipped...
> How do I handle this case? Ideally,
> I would want the dots to be handled just like normal characters...what
> if just remove the section from Symfony .htaccess that skips URL's
> with dots, with exception to .HTML? Will it create a problem for other
> kinda files? What's the problem if the request is handed over to
> controller in all cases? May be this is a foolish question...but
> honestly, it's not very clear to me...
> On Dec 4, 11:16 am, "Sid Bachtiar" <sid.bacht...@gmail.com> wrote:
>> The problem is with Symfony's .htaccess. Not in Symfony's controller
>> nor in Symfony routing. Just in .htaccess.
>> In a way this is a Symfony 'shortcoming'
>> > 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... :)
>> You can't really encode the dots (I think), otherwise we won't have
>> this problem.
>> On Thu, Dec 4, 2008 at 6:56 PM, Sumedh <sumedh.inam...@gmail.com> wrote:
>> > 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?
>> > 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" <gunnarl...@gmail.com> wrote:
>> >> Although not always possible or desirable, you can also get around this
>> >> problem by creating urls with ?. For example
>> >> somedomain.com/profiles/unsuscribe?email=someem...@anotherdomain.com.
>> >> 2008/12/3 Sid Bachtiar <sid.bacht...@gmail.com>
>> >> > 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
>> >> > 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 <sumedh.inam...@gmail.com> wrote:
>> >> > > Hi Friends,
>> >> > > How is one supposed to handle a URL having a dot ('.')?
This is a recurrent problem with the default .htaccess or the lighttpd
configuration for symfony
For example, if you want to pass float values as parameters.
The solution lies in customising your rewrite rules in you .htaccess
or lighttpd.conf to better reflect your own configuration. You may
need to plunge a little into regular expressions for that.
Fabrice
On Dec 4, 10:31 am, "Sid Bachtiar" <sid.bacht...@gmail.com> wrote:
> > What's the problem if the request is handed over to
> > controller in all cases? May be this is a foolish question...but
> > honestly, it's not very clear to me...
> Well, some URL are not for the controller. for example:
> images/something.gif or css/style.css or js/script.js
> I think it is better to add a rule that suits your situation than to
> try to handle all cases.
> Identify a pattern in your URL and add a rule to detect it.
> On Thu, Dec 4, 2008 at 10:23 PM, Sumedh <sumedh.inam...@gmail.com> wrote:
> > So, it doesn't contain something like '@' by which I can identify a
> > URL that is NOT to be skipped...
> > How do I handle this case? Ideally,
> > I would want the dots to be handled just like normal characters...what
> > if just remove the section from Symfony .htaccess that skips URL's
> > with dots, with exception to .HTML? Will it create a problem for other
> > kinda files? What's the problem if the request is handed over to
> > controller in all cases? May be this is a foolish question...but
> > honestly, it's not very clear to me...
> > On Dec 4, 11:16 am, "Sid Bachtiar" <sid.bacht...@gmail.com> wrote:
> >> The problem is with Symfony's .htaccess. Not in Symfony's controller
> >> nor in Symfony routing. Just in .htaccess.
> >> In a way this is a Symfony 'shortcoming'
> >> > 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... :)
> >> You can't really encode the dots (I think), otherwise we won't have
> >> this problem.
> >> On Thu, Dec 4, 2008 at 6:56 PM, Sumedh <sumedh.inam...@gmail.com> wrote:
> >> > 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?
> >> > 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" <gunnarl...@gmail.com> wrote:
> >> >> Although not always possible or desirable, you can also get around this
> >> >> problem by creating urls with ?. For example
> >> >> somedomain.com/profiles/unsuscribe?email=someem...@anotherdomain.com.
> >> >> 2008/12/3 Sid Bachtiar <sid.bacht...@gmail.com>
> >> >> > 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
> >> >> > 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 <sumedh.inam...@gmail.com> wrote:
> >> >> > > Hi Friends,
> >> >> > > How is one supposed to handle a URL having a dot ('.')?
On Thu, Dec 4, 2008 at 10:57 AM, Fabrice B <fabrice.bernh...@gmail.com> wrote: > The solution lies in customising your rewrite rules in you .htaccess > or lighttpd.conf to better reflect your own configuration. You may > need to plunge a little into regular expressions for that.
I'm using this .htaccess and Apache 2.2 for symfonians.net and it works smoothly for urls with dots : http://pastie.org/330755
> On Thu, Dec 4, 2008 at 10:57 AM, Fabrice B <fabrice.bernh...@gmail.com> wrote:
> > The solution lies in customising your rewrite rules in you .htaccess
> > or lighttpd.conf to better reflect your own configuration. You may
> > need to plunge a little into regular expressions for that.
> I'm using this .htaccess and Apache 2.2 for symfonians.net and it
> works smoothly for urls with dots :http://pastie.org/330755
On Thu, Dec 4, 2008 at 11:15 PM, Nicolas Perriault <nperria...@gmail.com> wrote:
> On Thu, Dec 4, 2008 at 10:57 AM, Fabrice B <fabrice.bernh...@gmail.com> wrote:
>> The solution lies in customising your rewrite rules in you .htaccess
>> or lighttpd.conf to better reflect your own configuration. You may
>> need to plunge a little into regular expressions for that.
> I'm using this .htaccess and Apache 2.2 for symfonians.net and it
> works smoothly for urls with dots : http://pastie.org/330755
> On Thu, Dec 4, 2008 at 11:15 PM, Nicolas Perriault <nperria...@gmail.com> wrote:
> > On Thu, Dec 4, 2008 at 10:57 AM, Fabrice B <fabrice.bernh...@gmail.com> wrote:
> >> The solution lies in customising your rewrite rules in you .htaccess > >> or lighttpd.conf to better reflect your own configuration. You may > >> need to plunge a little into regular expressions for that.
> > I'm using this .htaccess and Apache 2.2 for symfonians.net and it > > works smoothly for urls with dots : http://pastie.org/330755
I actually did something like that, a little bit differently. One
thing though, you have to remember to modify the .htaccess if you have
other extensions like jpeg, jpe, swf, flv, mov, mp3, pdf, and so on. I
guess you could add them all there.
On Fri, Dec 5, 2008 at 7:59 PM, Eno <symb...@gmail.com> wrote:
> On Thu, 4 Dec 2008, Sid Bachtiar wrote:
>> Care to collaborate what it does? :)
>> I tried it and it seems to work nicely
> The normal htaccess file skips ANY file with a dot in the URL. I think
> his version explicitly states which files to ignore using this expression:
> \.(css|js|png|gif|jpg)$
> so all other URLs go to the front controller (another rule deals with
> .html files, same as the normal htaccess file).
>> On Thu, Dec 4, 2008 at 11:15 PM, Nicolas Perriault <nperria...@gmail.com> wrote:
>> > On Thu, Dec 4, 2008 at 10:57 AM, Fabrice B <fabrice.bernh...@gmail.com> wrote:
>> >> The solution lies in customising your rewrite rules in you .htaccess
>> >> or lighttpd.conf to better reflect your own configuration. You may
>> >> need to plunge a little into regular expressions for that.
>> > I'm using this .htaccess and Apache 2.2 for symfonians.net and it
>> > works smoothly for urls with dots : http://pastie.org/330755