× Here you can get community support related to ReDJ.

redirect complicated url

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
11 years 10 months ago #1675 by darkhoros
redirect complicated url was created by darkhoros
Hi,
I have a url like this
www.domain.com/24/29/property_for_SALE/Uptown%20Cairo

which I like to maintain same url but redirect to this URL

www.domain.com/index.php/component/joomd/real-estate-egypt/search-results.html?cats[0]=22&cats[1]=24&field_29=Sale&field_33[0]=Uptown%20Cairo

Notice that 24/29/ are cats[0]=22&cats[1]=24
and property_for_Sale is field_29=Sale
and Uptown%20Cairo is field_33[0]=Uptown%20Cairo

How can I do this.
Thank you.

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

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
11 years 10 months ago #1676 by darkhoros
Replied by darkhoros on topic redirect complicated url
Hi,
Trying to do this using .htaccess file
I used this lines in the .htaccess file

RewriteCond %{REQUEST_URI} similar [NC]
RewriteRule ^similar/([^/]+)/([^/]+)/property_for_([^/]+)/compound_([^/]+)$ /component/joomd/real-estate-egypt/search-results.html?cats[0]=$1&cats[1]=$2&field_29=$3&field_33[0]=$4 [R,NE]

which redirects the 1st URL to the 2nd:
www.myegyptrealestate.com/similar/22/25/property_for_rent/compound_lake%20view
www.myegyptrealestate.com/index.php/component/joomd/real-estate-egypt/search-results.html?cats[0]=22&cats[1]=25&field_29=rent&field_33[0]=lake view

My question now is, can redj do this?
I like your product alot, and I am very much interested in stretching its capabilites to the max.
Thank you for your time.
Regards.

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

More
11 years 10 months ago #1677 by admin
Replied by admin on topic redirect complicated url
Yes, it seems it can be done. But is not clear to me i you need this complex rule for a single URL or (as I guess) for a group of URLs with the same structure...

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

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
11 years 10 months ago #1678 by darkhoros
Replied by darkhoros on topic redirect complicated url
Hi,
Thank you for your kind reply.
Yes I need this rule for hundreds of URLs, you think I can do with redj?
Thank you.

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

More
11 years 10 months ago #1679 by admin
Replied by admin on topic redirect complicated url
Yes, it was created for this...

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

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
11 years 10 months ago #1680 by darkhoros
Replied by darkhoros on topic redirect complicated url
Hi,
Well I was unable to figure out how to get the 4 variables from the flat link and use to create the dynamic link, I hope you can help me in this.

I am sure you are very good with .htaccess files, so you will have a very good idea of what I am trying to do.
Thank you.

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

Time to create page: 0.142 seconds