Search

The behaviour Stuart describes is exactly what I was getting.

I actually discovered I didn't need to use URL Router for what I was doing (didn't realise you can have URL parameters on the root page... don't think it was possible with the Symphony version I used the last time I built a Symphony site.)

Route from /$1/pagename/ to /pagename/$1/ doesnt work, but redirect does. But I want to have it silently.

What am I doing/thinking wrong?

Does page-params influence routing?

I guess yes and that is why the force re-route checkbox is there. Params are empty but the route is to the index page when I check this.

Hey all, can I get a summary of the issues people are facing? I'd like to get this extension fixed ASAP under 2.5.1.

I've pushed some changes to the integration branch, can you please pull them down and have a look?

I tested your usecase Rudy and can confirmed integration works as expected for this scenario with those changes. Stuart, same for you bud.

John/Huib. Can you explain help explain the purpose of the force routing on Route's, not Redirect's? I removed it in this commit because Symphony will always return a page from this line. The only time that wouldn't happen is if another extension got involved and changed $context['row'].

+10 for brendo.

The integration branch solved the problems

Thanks Brendo. Working as expected now!

All good for me too. Thanks again Brendo.

Hi Brendo

John/Huib. Can you explain help explain the purpose of the force routing on Route's, not Redirect's?

I use routes as follows:

Route from: /:animal
Route to: /animal/:animal

http://example.com/badger/ maps to http://example.com/animals/badger/

The problem is that if I have other Symphony pages in the site (e.g /contact/), I need the router to look for the contact page before sending traffic to http://example.com/animals/contact/. If not I need to set up a static route for each page before my dynamic route.

When we had the checkbox, I could leave it unchecked and the desired functionality would work. Now I need to set up a static route for any other pages. E.g.

Route from: /contact/
Route to: /contact/

Perhaps I am missing something?

Hm ok, so it's mainly to assist with with doing parameters off the index or off parent pages that do exist in the system.

The previous logic doesn't quite work I don't think because Symphony will always resolve to something. If the desired URL doesn't exist, it'll return the index page back.

This means that /animals/contact/ will return /index/, and then the route will only proceed if that force setting is turned on. If the setting is not turned on, it won't route.

Ok, I wasn't testing multiple paths. I had an index page with parameters, that's why index was always returned. Try the integration branch again, these checks feel more robust

Hi Brendo

Sorry for the delay responding, but your changes to the integration branch work perfectly for me. I owe you a beer :-)

I created a Page called page and set up the following routes...

From /:pt1

To /page/:pt1

and

From /:pt1/:pt2

To /page/:pt1/:pt2

I also, setup a page called menu and the page is ignored since I have the above route setup...

So then I add in the following route...

From /menu/

To /menu/

And nothing happens, it still uses the Page called page instead of menu

How I am able to use another page without the route overriding it?

@bzerangue are you using the latest version? This sounds like the bug which brendo fixed in version 3.1

@stuartgpalmer - I am using version 3.1.

Hi I'm also having problems with version 3.1 of the router. The page I am trying to route exists and without the check box 'force re-route even if page exists' it doesn't seem to work. Am I doing something wrong?

I have two pages; projects (shows list of projects and accepts pagination parameter $pageno) projects/projects-single (this one accepts the url parameter $project-title)

so my routes are;

//projects/(d{1,3})// to /projects/$1/

//projects/(.+)// to /projects/projects-single/$1/

this works great with older versions of symphony and url router, just not the most recent. any help would be greatly appreciated.

edit there are backslashes in the correct places in those routes, they just aren't showing up properly.

I’m only just starting to realise the power of this very neat extension. I wish I had used it before since it would have saved me some headache. In other words:

AWESOME!

:)

Dear friends of regular expressions,

I have an URL scheme like this:

/[language]/[subnav]/[article]/

Which renders into a standard article based on a root page with this url scheme.

However, I want to capture a specific URL to be rerouted to a special page which works fine as long as there are more url-parameters, but not if there is only the part of the URL that works as an article. E. g.:

First rule (routes fine to page »veranstaltungsarchiv«):

url:    /de/ueber-uns/veranstaltungsarchiv/2010/
find:    /\/(de|en)\/(.*?)\/veranstaltungsarchiv\/(\d\d\d\d)/i
replace: /veranstaltungsarchiv/$1/$3/

Second rule (renders a standard-article instead of routing to »veranstaltungsarchiv«):

url:    /de/ueber-uns/veranstaltungsarchiv/
find:    /\/(de|en)\/(.*?)\/veranstaltungsarchiv/i
replace: /veranstaltungsarchiv/$1/

It seems like URL Router is not able to overwrite symphony’s own routing if the URL fits into the standard article scheme. I’m quite sure I had this working somewhere else, but am unable to reproduce this.


So the question is: How can I force Symphony to use the URL Route instead of the Regular Page?

Happy New Year everyone.

I just migrated an old Expression Engine blog to Symphony CMS and now I need to forward the old URLs to the new ones.

The old URL structure looks like this:

http://www.mywebsite.com/index.php/global/article/symphony-voted-best-cms-ever

And the new one like this:

http://www.mywebsite.com/blog/article/symphony-voted-best-cms-ever

Any idea how this can be done using the URL router extension?

I already tried FROM //index.php/global/article/(.*?)//i and TO /blog/article/$1/. But that won't work because it forwards everything after the root, including image paths etc.

Thanks for any help.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details