× Here you can get community support related to ReDJ.

How to redirect all pages to the home page ?

  • patoushka
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 7 months ago #6598 by patoushka
Hello,

I need to redirect all the website's pages to the home page, but I don't know how to achieve that. Can you give me the REGEX to do that?

Many thanks,

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

  • patoushka
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 7 months ago #6599 by patoushka
Replied by patoushka on topic How to redirect all pages to the home page ?
Will it be this?


From URL: ^/
To URL: http://{siteurl}/

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

More
6 years 7 months ago #6611 by admin
You guessed it!

BTW, the From URL can also be just a dot.

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

  • patoushka
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 7 months ago #6619 by patoushka
Replied by patoushka on topic How to redirect all pages to the home page ?
I tried this, but it also redirects the homepage to the homepage. So I have an infinite loop. How to exclude the homepage in this rule?

Thanks,

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

  • patoushka
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 7 months ago #6626 by patoushka
Replied by patoushka on topic How to redirect all pages to the home page ?
Any development on this? I just need the way to exclude the home page to the rule. Thanks

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

More
6 years 7 months ago #6636 by admin
Tricky question.... but try this:
From URL: ^/.
To URL: http://{siteurl}/
Request only: true (checked)

The dot requires at least another char after the / so it should skip rthe home.

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

Time to create page: 0.143 seconds