Duc Anh
Duc Anh

Reputation: 581

Laravel4 Iframe URL with special chartecter throw NotFoundHttpException

I'm currently using Laravel4 for my project.

It's ok when I use this:

<iframe src="{{URL::to('/'). $video->path}}" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>

But when I use this:

<iframe src="{{URL::to('/'). $video->path}}&autoplay=0" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>

The iframe will return Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException.

How can I fix this? Please help me out. Thanks so much smile

Upvotes: 0

Views: 882

Answers (1)

diegofelix
diegofelix

Reputation: 396

I think you doing the query string wrong.

If the URL of the video is: yoursite.com/video1 and you append a &autoplay=0, then the url will be yoursite.com/video1&autoplay=0 which does not exist.

Change the &autoplay=0 to ?autoplay=0 to see if its works.

Upvotes: 1

Related Questions