Development

#2295 (default .htaccess doesn't allow dotted string as variable)

You must first sign up to be able to contribute.

Ticket #2295 (closed documentation: fixed)

Opened 6 years ago

Last modified 5 years ago

default .htaccess doesn't allow dotted string as variable

Reported by: Manuel.Dalla.Lana Assigned to: Carl.Vondrick
Priority: minor Milestone: 1.0.12
Component: routing Version: 1.0.7
Keywords: .htaccess dot Cc:
Qualification: Ready for core team

Description

The default .htaccess has a too strict rule on url with dots in it. example:

routing.yml

test:
  url:   /test/:title
  param: { module: test, action: index }

/modules/test/templates/indexSuccess.php

<?php echo $sf_params->get('title'); ?>

Now, if we pass the following this url http://localhost/test/a.b.c we obtain a 404 file not found.

Commenting the first rewrite rule in .htaccess resolve this issue:

  # we skip all files with .something
  #RewriteCond %{REQUEST_URI} \..+$
  #RewriteCond %{REQUEST_URI} !\.html$
  #RewriteRule .* - [L]

Change History

12/20/07 21:01:17 changed by fabien

  • type changed from defect to documentation.

I think this is more a documentation problem.

02/27/08 03:41:24 changed by Carl.Vondrick

  • owner changed from fabien to Carl.Vondrick.
  • status changed from new to assigned.
  • qualification changed from Unreviewed to Ready for core team.

Does r7620 resolve this or does it need to go in the book as well?

02/27/08 07:11:27 changed by fabien

I think we can update the book as well. symfony 1.1 does not have this issue as those 3 lines are commented by default.

02/27/08 07:37:56 changed by Carl.Vondrick

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [7624]) 1.0 doc: clarified adding periods to routes in .htaccess (closes #2295)

02/27/08 15:56:43 changed by fabien

  • milestone set to 1.0.12.