Home Forum
2024-03-29
Benvenuto, Ospite
Nome Utente Password: Ricordami

Do I have to include index.php in From URL
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: Do I have to include index.php in From URL

Do I have to include index.php in From URL 12 Anni, 7 Mesi fa #2491

I purchased the Enterprise edition a couple hours ago and I'm trying to accomplish the following redirection...

User types into browser: www.mysite.com/my-variable
ReDJ redirects to: www.mysite.com/index.php?option=com_mycomponent&view=edit&Itemid=27/id=my-variable
While still displaying: www.mysite.com/my-variable


In my Item Settings, I specify the following:
From URL: /variable
To URL: http://{siteurl}/index.php\?option=com_mycomponent&view=edit&Itemid=27&id=my-variable
Internal Redirect

In my plugin settings, I have the following:
-Enabled (and has proper position)
-Early redirect enabled


I can't get this to work. However, I can get the follwing to work properly:
From Url: index.php/my-variable
To URL: http://{siteurl}/index.php\?option=com_mycomponent&view=edit&Itemid=27&id=my-variable

Unfortunately, the user has to type the "index.php/" part, and I really need to avoid this. How can I accomplish?
L'Argomento è stato bloccato.

Re: Do I have to include index.php in From URL 12 Anni, 7 Mesi fa #2501

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi,
first thanks for getting Enterprise version.

A fast note,
the question mark needs to be escaped only in the From URL, while the destination is an absolute pure URL, which can also contain macros.

Now I have a question for you. I don't understand the difference and the type of variable and my-variable. Could you please post a real example with a full source and destination url? If you like, send me a mail at info(at)sistemistica.it.

Luigi
Ultima modifica: 12 Anni, 7 Mesi fa Da admin.
L'Argomento è stato bloccato.

Re: Do I have to include index.php in From URL 12 Anni, 7 Mesi fa #2507

I changed the structure of my URL (per Luigi's advise) from www.mysite.com/my-variable to www.mysite.com/myapp/my-variable. Using this approach, I'm able to specifically target the redirection for the "myapp" visitors while still serving pages like www.mysite.com/home.html and www.mysite.com/contact/ to everyone else.

The following settings are working perfectly:

From URL: ^/myapp/
To URL: http://{siteurl}/index.php?option=com_mycomponent&view=form&Itemid=27&my-variable={preg_match 1}/\/myapp\/([^\/]+)/i{/preg_match}

Also, I had to enable SEF and Apache mod_rewrite in Joomla Global config. To enable this, I had to rename htaccess.txt to .htaccess because I'm on an Apache web server and add www.mysite.com to the Live Site setting in the configuration.php file (located in Joomla root directory).

Hope this helps others...

One last thing - I believe the "i" shown right before the closing preg_match tag indicates that the search/match is NOT case-sensitive. I'm hoping someone can confirm this.....
L'Argomento è stato bloccato.

Re: Do I have to include index.php in From URL 12 Anni, 7 Mesi fa #2509

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
I can confirm,
the "i" is for "case insensitive".

php.net/manual/en/function.preg-match.php

php.net/manual/en/pcre.pattern.php

www.php.net/manual/en/reference.pcre.pattern.modifiers.php

Happy to hear you solved.

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