Home Forum
2024-12-21
Benvenuto, Ospite
Nome Utente Password: Ricordami

Redirect matching question
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: Redirect matching question

Redirect matching question 12 Anni, 9 Mesi fa #3103

  • quorvia
  • Offline
  • Fresh Boarder
  • Messaggi: 4
Google has indexed my dynamic urls incorrectly causing me some issues.

Correct url:-
index.php?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=14&option=com_virtuemart&Itemid=7

Google also has incorrect urls - e.g.:-

index.php?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=17&option=com_virtuemart&Itemid=7

index.php?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=34&option=com_virtuemart&Itemid=7


(this is just an example of one product , there are over a hundred more incorrect product/category_id errors in google for different products)

I have created a match (see below) but this leaves me with an issue in the example above as it will not match any product category that has a 1 in the first position:-

From:-
index.php\?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=[^1][^0]&option=com_virtuemart&Itemid=7

To url:-

index.php?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=14&option=com_virtuemart&Itemid=7


Is there any way I can create a match that matches on everything EXCEPT for a specific value in the category_id element.

e.g. match on every category_id except 14.

If I buy the paid version (as I cannot find anywhere to donate funds to you?), will my existing settings including 404 pages and redirect items be maintained.


Kind regards
Andrew
Ultima modifica: 12 Anni, 9 Mesi fa Da quorvia.
L'Argomento è stato bloccato.

Re: Redirect matching question 12 Anni, 9 Mesi fa #3104

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi Andrew,
what you need can be done this community version (no need to pay for a subscription).

Unfortunately (at the moment) you need a rule for any URL with wrong "aliases". This is because (at the moment) there's no way to guess the right URL from an alias. But I'm receiving many (many) request of this same type and I'm working on this...

Meanwhile, create this rule:

From URL:
^/index\.php\?page=shop\.product_details&flypage=flypage\.tpl&product_id=97&category_id=[^1][^4]
 
To URL:
http://{siteurl}/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=14&option=com_virtuemart&Itemid=7


Best regards,
Luigi
L'Argomento è stato bloccato.

Re: Redirect matching question 12 Anni, 9 Mesi fa #3105

  • quorvia
  • Offline
  • Fresh Boarder
  • Messaggi: 4
Many thanks for your response

I had determined such a test and put in my example (except that I stupidly put a 0 not a 4 in the second digit test)

index.php\?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=[^1][^4]&option=com_virtuemart&Itemid=7

But the suggested "from URL" setting will not achieve a match for all EXCEPT a 14.

index.php\?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=[^1][^4]

In the example above category_id of 11 12 13 15 16 17 18 19 and 24 34 44 54 64 etc will not be matched.

Any other suggestions are welcome.

If I do not need to buy the paid version, how can I donate a small amount to you for such a great product? Or should I just but the enterprise edition even though I do not need it??

Kind regards
Andrew
L'Argomento è stato bloccato.

Re: Redirect matching question 12 Anni, 9 Mesi fa #3106

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi Andrew,
you are right, my solution doesn't work...

The reason is you need a negative look-ahead assertion (NOT 14). Unfortunately this is not supported by MySQL REGEXP, so we should find a way to "emulate" this:

([^1]|[1][^4])

For the future, I'm planning to add some additional conditions to a matching rule. The first rule that match with all its conditions, will be applied for redirection. And conditions could be, as example, additional check on URL string....

Kind regards,
Luigi

P.S. Why you want to pay if you don't need it???
L'Argomento è stato bloccato.

Re: Redirect matching question 12 Anni, 9 Mesi fa #3107

  • quorvia
  • Offline
  • Fresh Boarder
  • Messaggi: 4
I am not sure what your regex string is doing in your example.

But I think you understand where I want to get to, exactly like the look-ahead function.

Is this possible now, or do I have to wait or, will it not really be possible and I should just get on with adding the re-directs (with a less than perfect ,but still better than nothing regex)?

I want to donate because your module has really helped me out (even before this issue!) and a small donation might get you a nice cool beer after a long tiring day!
L'Argomento è stato bloccato.

Re: Redirect matching question 12 Anni, 9 Mesi fa #3108

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Yes, my suggestion is a different way to get result:

From URL:
^/index\.php\?page=shop\.product_details&flypage=flypage\.tpl&product_id=97&category_id=([^1]|[1][^4])
 
To URL:
http://{siteurl}/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=97&category_id=14&option=com_virtuemart&Itemid=7


This piece ([^1]|[1][^4]) means "not 1 or 1 but not 4", and is a tricky way to exclude 14...

I really appreciate your wish to donate, and you can find the donate button in the redj about panel.

Kind regards,
Luigi
L'Argomento è stato bloccato.

Re: Redirect matching question 12 Anni, 9 Mesi fa #3109

  • quorvia
  • Offline
  • Fresh Boarder
  • Messaggi: 4
Luigi

You were so close, but I managed to work it out (mainly based on your last suggestion)

The way I am doing to do this test is:-

Match all but 14
([^1][0-9]|[1][^4])

Match all but 23
([^2][0-9]|[2][^3])


Thus I can now sort out the problem for my many hundred urls with only one item per url.


I have donated a small amount (hope it is enough to buy a beer in Italy!)


Many many thanks!!
L'Argomento è stato bloccato.

Re: Redirect matching question 12 Anni, 9 Mesi fa #3110

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Ok, but be advised that your solution means "always two digits", while mine was also for "single digit" number...

Really thanks for the donation, is enough for a cold beer, and remain also enough to subscribe you to ReDJ Enterprise.

Now, just login and go to ReDJ page, and you will see the donwload button under the Enterprise column (forever).

Cheers,
Luigi

P.S. In a few days the Open Source / Joomla section on this site will be migrated under a new domain - English site . Users and subscriptions will be migrated too.
Ultima modifica: 12 Anni, 9 Mesi fa Da admin.
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.72 secondi
Cerca con Google
News
Chi è online
 257 visitatori online
Sponsor

slotmachineaamsonline.com è una guida alle migliori slot machine online legali in Italia. Sul sito trovi un elenco sempre aggiornato dei casino online con Slot machine e bonus slot, le ultime novità dal mondo delle slot online e le migliori strategie per vincere. Inoltre, è disponibile una sezione dedicata alle slot machine da BAR che finalmente sono disponibili nella versione online.