× Here you can get community support related to ReDJ.

Noob chalk talk

  • Quartermaster
  • Quartermaster's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago #4211 by Quartermaster
Noob chalk talk was created by Quartermaster
I'm just dumb. :-(

I have a zoo directory on my site the URLs are:
http:/{sitename}://folder1name/item/business-name

I want it to be
http://{sitename}://business-name

So visitors to my site can just enter http://sitename/business-name
What in the world am I doing wrong?

From URL: Existing URL (http:/{sitename}://folder1name/item/business-name)
To URL: Destination URL (http://{sitename}://business-name)
Redirect: 200 (Internal)
Request only: True
Decode URL: True

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago - 8 years 7 months ago #4213 by admin
Replied by admin on topic Noob chalk talk
Hi,
first you are not dumb at all. :)

What you need is to create a redirect (internal) from the URL the user type (non-existing) to the page that really exists. So try something like this (literally):
From URL: ^/business-name$
To URL: {scheme}://{siteurl}/forder1name/item/business-name
Redirect type: 200 (internal)
Request only: true (checked)

Some additional tips to help you understand how the rule works:

- The From URL can be a regular expression, so we used the caret (^ start with) and the dollar ($ end with) to restrict ONLY to a single URL. For this to work, you need "request only" set to true (it ignores the domain part of the incoming requests).

- The internal redirect allows to change the URL to destination only on server side (inside Joomla), so the browser still stay on the original URL and the user doesn't notice the final URL (useful to create alias, short URLs). This feature is only available on the Enterprise version.

- The macros like {siteurl} are useful to build dynamic destinations, but can be used ONLY in the destination, and are not supported on the From URL.

Let me know if you need more help.

Kind regards,
Luigi
Last edit: 8 years 7 months ago by admin.

Please Log in or Create an account to join the conversation.

  • Quartermaster
  • Quartermaster's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago - 8 years 7 months ago #4215 by Quartermaster
Replied by Quartermaster on topic Noob chalk talk
Okay, I've read most of this before I posted.
So the {scheme} variable means "http" or "https", correct?

From URL: ^/faulkner-honda$
To URL:http://harrisburgpa.com/concierge/item/faulkner-honda
200
Redirect type: Request Only: True

I know this isn't right, but how would I use the "placeholders" for alternate destination URLs like misspellings?
/faulknerhonda
/faulkner
/FaulknerHonda
/Faulkner
Last edit: 8 years 7 months ago by Quartermaster.

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #4216 by admin
Replied by admin on topic Noob chalk talk
Hi,
I know it works now but please change the To URL as follow (more portable):
{scheme}://{siteurl}/concierge/item/faulkner-honda

About your question, you cannot use macros for misspellings (the macro are in the target and the target is always the same). But you can use regexp power to have a single rule:
From URL: ^/(faulkner-honda|faulknerhonda|faulkner|FaulknerHonda|Faulkner)$

Or something more creative like:
From URL: ^/[fF]aulkner(-?[hH]onda){0,1}$

Please Log in or Create an account to join the conversation.

  • Quartermaster
  • Quartermaster's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago #4217 by Quartermaster
Replied by Quartermaster on topic Noob chalk talk
Whoa! :woohoo:
More creative is an understatement.
Thank you! :lol:

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #4219 by admin
Replied by admin on topic Noob chalk talk
U're welcome ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.103 seconds