× Here you can get community support related to ReDJ.

Redirect home to another page

  • Deveshi
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago #4913 by Deveshi
Redirect home to another page was created by Deveshi
Hello,

New to this extension but so far it looks good. However, I am having some difficulty using a redirect on my homepage.

First of all, I'm currently working on localhost (which seems to be making things more difficult). I'd like to get this working on localhost first so I understand the extension properly before moving it to production server.

So what I need to achieve is a redirect from my homepage to another page in my site. The problem Im having is trouble identifying the home URL... Tried using the following:

/
/home
/home.html
014-edu-1.0.0.1/
localhost/014-edu-1.0.0.1/
http://localhost/014-edu-1.0.0.1/

The result being that either the redirect doesn't work or it is redirecting every page of my site.

Please advise what method I should use for redirecting from my homepage only.

Thanks

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

More
8 years 7 months ago #4914 by admin
Replied by admin on topic Redirect home to another page
Hi,
to get rid of the domain part in the rule you should create "relative" rules and leave the "request only" checked to yes. In this way your rules will still work moving your site on production.
There is also a "base path" in the plugin options, under advanced settings, that allows you to specify a "temporary" base path to consider before to apply rules. So if you have a site under a subfolder, you can create specify this in the base path and create rules as it was in the domain root. When you move the site on the root, just drop the base path from settings.

About rules creation, I could help you, but you should ask me for a real example (old -> new). Consider that each rule is a regular expression, so you can specify just parts of the whole URL to match and you need to escape special chars (e.g. like question mark).

Kind regards,
Luigi

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

  • Deveshi
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago #4915 by Deveshi
Replied by Deveshi on topic Redirect home to another page
Hi Luigi,

Thanks for getting back to me but I'm still a little lost... If we could work through an example that would be helpful.

The address of my homepage on localhost is:

http://localhost/014-edu-1.0.0.1/

Which will be updated to www.edu-gaming.com when uploaded to production.

I'd like this page to redirect to

http://localhost/014-edu-1.0.0.1/community

(production version = www.edu-gaming.com/community)

I have played around with the extension and I am able to get other pages to redirect to the community page. For example, if I take another page on my site:

http://localhost/014-edu-1.0.0.1/reviews

and put /reviews in From URL and /community in To URL it all works fine. However, I'm having difficulty identifying the From URL to redirect from my homepage.

Can you provide an example of what I should be putting in the From URL field to redirect from my homepage.

Thanks.

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

More
8 years 7 months ago #4916 by admin
Replied by admin on topic Redirect home to another page
First set this in the plugin option "base path":
/014-edu-1.0.0.1

After this, create a rule as follow:
From URL: ^/$
To URL: {scheme}://{siteurl}/community
Request only: true (checked)

This should work nn both sites.

Kind regards,
Luigi

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

  • Deveshi
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago #4919 by Deveshi
Replied by Deveshi on topic Redirect home to another page
Works perfectly, thanks, you're an absolute star!!! :woohoo: :woohoo: :woohoo:

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

More
8 years 7 months ago #4920 by admin
Replied by admin on topic Redirect home to another page
Thank you!!! :)

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

Time to create page: 0.167 seconds