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

Wildcard redirects?
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: Wildcard redirects?

Wildcard redirects? 13 Anni, 7 Mesi fa #2198

Hello,
Thank you for the great component! Does either the community or enterprise version support wildcard redirects? That is, can I setup a rule to redirect all references to /photogallery/* to /new-directory/* ?

Ciao!
timburkart
L'Argomento è stato bloccato.

Re: Wildcard redirects? 13 Anni, 7 Mesi fa #2199

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Of course yes.
The from URL could be a regular expression and also could partially match. So you could use something like this:

From URL: /photogallery/
To URL: http://{siteurl}/new-directory/{pathltrim /photogallery/}


Best regards,
Luigi
L'Argomento è stato bloccato.

Re: Wildcard redirects? 13 Anni fa #2900

  • Stefan
  • Offline
  • Fresh Boarder
  • Messaggi: 7
Hi Luigi,

Ive got the plugin working great now, works great thanks, but need bit of help with a final few redirects.

Our old HTML site had lots of old PDFs such as this. (some with lots of spaces in the file names)

e.g. www.latitude51solar.ca/Brochures/L51S%20Brochure.pdf

We have redone all the brochures and deleted lots of them, I want to redirect any request for

www.latitude51solar.ca/Brochures/any brochure.pdf

to the new location

www.latitude51solar.ca/index.php/solar-school/brochures

Basically any request for the old folder to the new folder. Not looking to do individual redirect for each file. Ive been banging my head and searched the forum but cant seem to work out the syntax?

Thanks

Stefan
L'Argomento è stato bloccato.

Re: Wildcard redirects? 13 Anni fa #2903

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi Stefan,
if the destination is always the same it's easy, just match any source URL:

From URL: ^/Brochures/.*\.pdf$
To URL: http://{siteurl}/index.php/solar-school/brochures

Cheers,
Luigi
L'Argomento è stato bloccato.

Re: Wildcard redirects? 13 Anni fa #2904

  • Stefan
  • Offline
  • Fresh Boarder
  • Messaggi: 7
Thanks Luigi,

I used the syntax above....
To URL: http://{siteurl}/index.php/solar-school/brochures

but got an error page saying it could not load.....

anyway I changed it to


To URL: /index.php/solar-school/brochures

and everything worked fine, thanks for your response again.

Just a suggestion .... maybe have a single page somewhere that people can add examples of the TO / FROM code.

Basically the page is a big list of "this worked" and "how to" It would make it easier for us non programmer types to get examples and would hopefully reduce the amount of time you have to spend replying to our emails

Anyway thanks again.

Stefan
L'Argomento è stato bloccato.

Re: Wildcard redirects? 13 Anni fa #2905

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
L'Argomento è stato bloccato.
Ringraziano per il messaggio: Stefan

Re: Wildcard redirects? 13 Anni fa #2906

  • Stefan
  • Offline
  • Fresh Boarder
  • Messaggi: 7
Hi Luigi,

Yes Ive read the tutorial, it helped a lot. There are so many possibilities with the program that non programmers do have problems with understanding the syntax. You solution above was simple but I couldnt work it out.

There were lots of postings in the forums with similar questions, all slightly different to each other and you reply to each one individually.

Anyway its all working now, just wait for google to index it to see what I have missed...

Thanks
L'Argomento è stato bloccato.

Re: Wildcard redirects? 13 Anni fa #2907

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi Stefan,
I'm working on a new site in English dedicated to Joomla and Open Source. And I would like to create a lot of tutorials like you suggest...

Just need time to complete the job (and it's not easy to find). Meanwhile, I'm here for any question (no matter if is easy or hard...).

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