{"issue":{"state":"open","created_at":"2011-11-24T12:59:58Z","updated_at":"2011-11-24T13:00:04Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","login":"importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":5,"body":"In TL when you set-up htaccess for rewrite, the following URL generates an error (file not found).\n\n```\nhttp://www.website.co.za/parts-catalog/ProductType/CAB+SLIDERS/VehicleMake/FORD/VehicleModel/BANTAM+%2F+RUSTLER+CEN.html\n```\n\nVehicleModel=BANTAM / RUSTLER CEN\nthe URL has been encoded to prevent the \"slash\" from being considered as part of the URL, but TL still \"decrypts\" it as being seperate GET parameters, e.g.\n\nThis is the error:\n\n```\n\n**Not Found**\n\nThe requested URL /parts-catalog/ProductType/CAB+SLIDERS/VehicleMake/FORD/VehicleModel/BANTAM+/+RUSTLER+CEN.html was not found on this server.\n\n```\n\nYou can see that either Apache or TL has expanded the %2F to \"/\" which should not happen. Is there a way around this?\n\n--- _Originally created by thyon on February 24th, 2009, at 05:38pm (ID 541)_","assignee":{"gravatar_id":"360d94de41513598ac4440d46a3dab1b","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/360d94de41513598ac4440d46a3dab1b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":541,"id":2341313,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"color":"e6e6e6","name":"backend","url":"https://api.github.com/repos/contao/issues/labels/backend"},{"color":"bd2c00","name":"Defect","url":"https://api.github.com/repos/contao/issues/labels/Defect"}],"title":"URL cannot contain encoded \"/\" (%2F), as TL (or htaccess?) interprets it as GET parameters","closed_at":null,"html_url":"https://github.com/contao/issues/issues/541","milestone":null,"url":"https://api.github.com/repos/contao/issues/issues/541"},"action":"created","comment":{"created_at":"2011-11-24T13:00:02Z","updated_at":"2011-11-24T13:00:02Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","login":"importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I just don't have enough knowledge at the webserver level to test whether its TL or Apache, but you can just type in a GET parameter with a slash in and you'll see it doesn't work, e.g.\n\n\nnormally\n\nmypage.html?title=iPod/iPhone Charger\n\nis converted using addToUrl():\n\nmypage/title/iPod/iPhone%20Charger.html\n\nand of course that doesn't work, because now its interpreted as:\n\ntitle=iPod and iPhone Charger= (blank) -- which is not correct\n\nI just re-encode special characters in the URL like \"/\" with \"--slash--\" and then reverse it in the catalog module, to preserver the special character. I've set-up a settings array so people can use their own set of replacements, e.g. \n\n```\n$_GET[$k] = str_replace($GLOBALS['TL_CONFIG']['catalog']['safeReplace'], $GLOBALS['TL_CONFIG']['catalog']['safeCheck'], $v);\n```\n\nand the parameters are in the config.php file:\n\n```\n\n/**\n* CONFIG Parameters\n */\n\n$GLOBALS['TL_CONFIG']['catalog']['safeCheck']\t= array('/', '\\_);\n$GLOBALS['TL_CONFIG']['catalog']['safeReplace']\t= array('-slash-', '-apos-');\n\n```\n\n--- _Originally created by thyon on April 5th, 2009, at 11:26am_","id":2864193,"url":"https://api.github.com/repos/contao/issues/issues/comments/2864193"}}