× Here you can get community support related to ReDJ.

Need help with couple of redirects

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 3 months ago #3416 by darkhoros
Need help with couple of redirects was created by darkhoros
Hi,
I have managed to redirect
/The-Square$
to
http://{siteurl}/index.php/component/joomd/real-estate-egypt/search-results?field_33[0]=The Square

but on my browser when i use url ending with The-Square&start=20 it is not redirecting to the supposed URL which is
http://{siteurl}/index.php/component/joomd/real-estate-egypt/search-results?field_33[0]=The Square&start=20

Notice the &start=20 at the end of the URL and this part change for every next page so I need a general redirect rule that fits all pages.

Second redirect is a bit tricky
I need all my old urls
http://{siteurl}/index.php/component/joomd/real-estate-egypt/search-results.html?field_33[0]=The%20Square&start=20
to be redirected to the new url
http://{siteurl}/index.php/component/joomd/real-estate-egypt/search-results?field_33[0]=The%20Square&start=20

it is same URL but I only dropped the .html from search-results.html? and maintained all the other parts of the URL.

I hope you can help me with this.
thank you alot.
Regards.

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

More
9 years 2 months ago #3417 by admin
Replied by admin on topic Need help with couple of redirects
Sorry but your rule contains a final $ which means "end with", so there's no way to match "&start=20". Please, adjust your rules according to regular expressions requirements.

About the second question, I can't see differences between old and new URLs...

Kind regards

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

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 2 months ago #3418 by darkhoros
Replied by darkhoros on topic Need help with couple of redirects
Thank you for your reply.
The difference in the second rule is the .html after the search-result before the question mark.
/search-results?field_33[0]=The%20Square
/search-results.html?field_33[0]=The%20Square

I need to map the second URL to the first URL, in other words a rule to remove the .html only as the rest of the URL is dynamic.

For the first rule how do I pase the variable after the word, I can remove the ending $ but how to do I pass the &start=20 from my new created rule to the 200 redirect url?

Thank you.

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

More
9 years 2 months ago #3419 by admin
Replied by admin on topic Need help with couple of redirects
The rule is:
From URL: ^/index\.php/component/joomd/real-estate-egypt/search-results\.html
To URL: http://{siteurl}/index.php/component/joomd/real-estate-egypt/search-results{queryfull}
Request only: true (checked)

but how to do I pass the &start=20 from my new created rule to the 200 redirect url?


What does this mean? You need to pass it or is already present in the requests? Not clear to me. To help you I need to know which URLs you want to match with a single rule and how to trasform.

Kind regards.

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

Time to create page: 0.107 seconds