0

i'm facing an issue i don't really know how to solve. I have this route:

www.mysite.com/news/{news}

On my local machine, i don't have a problem accessing it, but on the live-server a trailing slash gets added, and ofc the route doesn't exist = error.

Why does this slash get added? How to prevent it? Other routes work fine, no "/" added there. This ONLY happens in app.php ...app_dev.php works fine.

I've tried to remove the trailing slash via mod_rewrite, but then another route doesn't work. ( The FOSUserBundle /register one ....).

Does anyone know, why there's a trailing slash on the live-server, but not on my local machine? Same .htacces and 000-default.conf. And as stated above app_dev.php works fine as well.

Regards

Abdou Tahiri
  • 4,338
  • 5
  • 25
  • 38
  • Can you show us the routing file? – ديناصور الأمة Apr 22 '14 at 10:22
  • is the problem connected with urls like www.mysite.com/news **/1/** or www.mysite.com/news **/** ?? – Bartłomiej Wach Apr 22 '14 at 10:38
  • mod_rewrite module is the problem ...i disabled it now .... and everything works as it should. But i think i need it to remove the "app.php" part from the url ... –  Apr 22 '14 at 10:41
  • seems like the problem is the .htaccess inside the web folder. I've managed to reproduce the error on my localhost. It's def. the rewrite rule ... but WHY is it adding a slash only to this route?! –  Apr 22 '14 at 11:26

0 Answers0