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

Incorrect Redirect
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: Incorrect Redirect

Incorrect Redirect 15 Anni fa #902

  • bgguy
  • Offline
  • Fresh Boarder
  • Messaggi: 1
Hello Forum Members/Luigi,

This thing is awesome and I'm really excited about it's potential for my site.

I'm creating a social site for actors where they have profiles to display headshots/resume/reels, etc. I recently installed ReDJ for use in redirecting "user urls" to their actual location. For example redirecting www.Website.com/DavidSpeer (or www.Website.com/Username) to the php file that will create the users profile.

I have the PHP set up to automatically add the redirect entries to the ReDJ database table but whenever there are two similar usernames ReDJ stops reading the "From URL" after only part of the URL is satisfied.

For example: when testing with our Administrators (usernames admin, adminec, and adminsb)
When I type www.Website.com/admin it correctly redirects me correctly to www.Website.com/user/profiles/profile.php?un=admin

But when I type .../adminec instead of redirecting me to www.Website.com/user/profiles/profile.php?un=adminec it takes me to www.Website.com/user/profiles/profile.php?un=admin, as if the code stopped reading after "admin" had been found even though the full address was "adminec".

The same occurred with .../adminsb and any other string that followed "admin".

I'm not sure if there is a way to work around this or how to even begin. Any help would be appreciated even just directing me to some source.

Thank you so much.

Happy Holidays.

David Speer
270-303-2336
Questo indirizzo e-mail è protetto dallo spam bot. Abilita Javascript per vederlo.
L'Argomento è stato bloccato.

Re:Incorrect Redirect 15 Anni fa #904

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi David,
you have found a great way to provision items in ReDJ automatically.

The problem you are encountering can be solved easily. ReDJ compares the current URLs with "From URL" part of items configured, using MySQL regular expressions. There could be more items that match with an URL, as in your case. In this situations, ReDJ applies the first one using the item's order.

So, to solve your problem you can exploit power of regular expressions. Since you must match "exactly" the user name, try to add a dollar at the end of item. It means "ends with" so if you have two items as follow:

From URL 1: admin$
From URL 2: adminb$

The URL www.website.com/admin matchs only with the first one (while without the dollars these URL matches with both items).

I hope I was clear. If you need more help, let me know.

Regards,
Luigi
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.41 secondi
Cerca con Google
News
Chi è online
 207 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.