Page 1 of 1

URL Fixer discussion

Posted: Tue Jul 16, 2013 8:15 pm
by HaRT
I was trying to use the URL Fixer 4.1's regexp abilities to implement a local URL rewriter in Firefox 21, primarily to switch to mobile versions of some pages automagically; e.g. http://alburov.livejournal.com/55897.html --> http://m.livejournal.com/read/user/alburov/55897.
I've added a replacement of “re:(https?:)//(.+)(\.livejournal.com)/(\d+)\.html” to “$1//m$3/read/user/$2/$4” but that didn't work (the URL wasn't replaced). I tried to prefix the «Replace It With...» string with “re:” too, to use ‘\’ instead of ‘$’, to escape all ‘/’ characters in the «If I Type...» string, and combinations thereof — to no avail.

What am I doing wrong? Which particular regexp syntax is supported? Has anyone succeeded in using this feature?
A working example would be appreciated.

Re: URL Fixer discussion

Posted: Wed Jul 17, 2013 12:31 pm
by HaRT
It seems to only make replacements in the host part of the URL, not schema, path, etc.
If true, this is a major drawback for this otherwise very useful extension and an unjustified limitation of its advanced functionality.

Pingback

Posted: Mon Jul 22, 2013 6:29 pm
by HaRT

Re: URL Fixer discussion

Posted: Tue Jul 23, 2013 9:39 am
by Wladimir Palant
Yes, URL Fixer only changes host names, not other parts of the URL. That's how it works in general.

Re: URL Fixer discussion

Posted: Tue Jul 23, 2013 12:15 pm
by HaRT
Wladimir Palant wrote:URL Fixer only changes host names, not other parts of the URL. That's how it works in general.
That's a real pity!
This limitation definitely has to find its way into all relevant pieces of URL Fixer documentation, as currently it's far from obvious.

Any hope that URL Fixer will be able to fix other parts of URL (as its name suggests) anytime soon (at least via regexps)?

Re: URL Fixer discussion

Posted: Tue Jul 23, 2013 2:02 pm
by Wladimir Palant
Quite frankly, I'm not sure what to do with the custom rules at all - right now they are a big footgun, it's too easy to break things and to be left wondering why something doesn't work later.

Re: URL Fixer discussion

Posted: Tue Jul 23, 2013 3:02 pm
by HaRT
Wladimir Palant wrote:it's too easy to break things and to be left wondering why something doesn't work later.
Current implementation communicates the change being made quite clearly. If some future version of URL Fixer assigns ids (consecutive numbers?) to the custom rules and adds the id of the applied rule to the message, that will be enough for troubleshooting. And, of course, many other features may be helpful to simplify the entire workflow.

Yet the question of correcting other parts of URL is interesting regardless of custom rules. Consider, say, multi-script keyboard layouts where some characters are produced by different keys depending on the active input language (e.g. in standard Latin-Cyrillic keyboard, ‘.’ in Russian is next to the right Shift, where ‘/’ is in US English). Since many sites still rely upon „file name extension”, users may end up with “host.tld/index/html” or “host.tld/default/aspx” instead of “host.tld/index.html” or “host.tld/default.aspx” respectively. Isn't that a perfect situation for URL Fixer to step in?

Re: URL Fixer discussion

Posted: Tue Aug 20, 2013 7:02 am
by throwaway
For Firefox 23.0.1, URLs are not corrected.

Re: URL Fixer discussion

Posted: Tue Aug 20, 2013 7:12 am
by throwaway1
Picture of corrections: http://i.imgur.com/ZpTwv7O.png

Gif of it not correcting: http://i.imgur.com/Uy2UY5j.gif