You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Local installation, Symphony 2.2.5, URL Router 1.3
Server document root: http://localhost:8080/
Website document root: http://localhost:8080/website
Goal: Redirect from site's index page to the same page with an added required default parameter (data source attached to page filtering entries on required parameter).
Redirect rule: from: ^$^ to: /default-parameter/
Accessing http://localhost:8080/website/ redirects to http://localhost:8080/default-parameter/, instead of http://localhost:8080/website/default-parameter/.
Accessing http://localhost:8080/website/parameter-that-should-throw-404/ redirects to http://localhost:8080/parameter-that-should-throw-404//default-parameter/, instead of throwing an 404 error since no entries are returned by the data source.
The text was updated successfully, but these errors were encountered:
First off, I couldn't get my head around the No ending delimiter '^' found that you were getting, until this morning.
I forgot to mention that all of the redirects are Regex as used in the preg functions of PHP, so need delimiting, like so:
/^$/
Above would be the example I mentioned on the forum. Only the from pattern needs this delimiting.
As for the redirecting to DOCUMENT_ROOT rather than the Symphony root, that definitely sounds like an URL Router problem. I'll look into that as soon as I can ;o)
Fixing the delimited regex string should solve the second redirect problem, hopefully.
First I changed the rule from: /^$/ to: /default-parameter/ and it behaved correctly as to whether it should throw a 404.
I thought that delimiting for the to field is required, that's why I used /default-parameter/, but since you mention that only the form needs it, I changed again to from: /^$/ to: default-parameter and everything works perfectly.
I am so grateful, thank you for looking into this and I apologize for my ignorance on the matter!
Local installation, Symphony 2.2.5, URL Router 1.3
Server document root:
http://localhost:8080/
Website document root:
http://localhost:8080/website
Goal: Redirect from site's index page to the same page with an added required default parameter (data source attached to page filtering entries on required parameter).
Redirect rule:
from: ^$^ to: /default-parameter/
Accessing
http://localhost:8080/website/
redirects tohttp://localhost:8080/default-parameter/
, instead ofhttp://localhost:8080/website/default-parameter/
.Accessing
http://localhost:8080/website/parameter-that-should-throw-404/
redirects tohttp://localhost:8080/parameter-that-should-throw-404//default-parameter/
, instead of throwing an 404 error since no entries are returned by the data source.The text was updated successfully, but these errors were encountered: