Redirection starting with ?
-
Barbaraamaro
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 5
-
Thank you received: 0
-
-
11 years 2 weeks ago #2270
by Barbaraamaro
Hi,
I migrated from 1.5 to 2.5 recently. My site is very large with more than 6,000 articles so I need some redirections to the exact articles.
My main problem at this moment is to redirect from the URL /?option=com_content&view=article&id=1003:this-is-the-article&catid=52:this-is-the-category&itemid=78
to the URL /secciones/this-is-the-category/1003this-is-the-article
I've tryed multiple instructions based on your guide and other posts in the forum but with no success, because I am not sure if I have to escape the initial quistion mark or not and how to place the slash.
Can you help me, please?
Thank you.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
11 years 2 weeks ago #2271
by admin
Hi,
I can suggest you a rule for this redirect to work. But it seems to me that you have a lot of URLs like this and I can see a relation among the old and new. So we could try to build a rule that matches many URLs if you want. To do this, I need a 2 or 3 examples (old->new) to build the rule. Meanwhile, for the single redirect the rule should be (the escape is the backslash):
From URL: \?option=com_content&view=article&id=1003:this-is-the-article&catid=52:this-is-the-category&itemid=78$
To URL: http://{siteurl}/secciones/this-is-the-category/1003this-is-the-article
Request only: true (checked)
Case sensitive: false (unchecked)
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
Barbaraamaro
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 5
-
Thank you received: 0
-
-
11 years 2 weeks ago #2272
by Barbaraamaro
Luigi:
Thank you for your kind answer.
Yes, like the example I gave there are lots of articles that I want to redirect because for SEO it appears as I have two or more articles with the same title.
Here are other examples:
OLD URL /?option=com_content&view=article&id=115:el-hacker-britanico-y-su-extradicion&catid=52:el-derecho-y- la-actualidad&Itemid=78
New URL /secciones/el-derecho-y-la-actualidad/115-el-hacker-britanico-y-su-extradicion
OLD URL /?option=com_content&view=article&id=2616:las-descargas-en-mexico&catid=34:capsulas-legales&Itemid=9 1
New URL capsulas-legales/2616-las-descargas-en-mexico
Thanks again for sharing your knowledge.
Best Regards.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
11 years 2 weeks ago - 11 years 2 weeks ago #2274
by admin
Hi,
try this:
From URL: \?option=com_content&view=article&id[0-9]+:.*&catid=[0-9]+:.*&Itemid=[0-9]+$
To URL: http://{siteurl}/secciones/${cat}/${id}-${slug}
Request only: true (checked)
Placeholders:
cat={preg_match 1}/catid=[0-9]+:(.*)&Itemid=/{/preg_match}
id={preg_match 1}/id=([0-9]+):(.*)&catid=/{/preg_match}
slug={preg_match 2}/id=([0-9]+):(.*)&catid=/{/preg_match}
If you are using the Community version use these placeholders (preg_match macro is only for Enterprise version):
query={query}
cat={preg_placeholder 1,query}/catid=[0-9]+:(.*)&Itemid=/{/preg_placeholder}
id={preg_placeholder 1,query}/id=([0-9]+):(.*)&catid=/{/preg_placeholder}
slug={preg_placeholder 2,query}/id=([0-9]+):(.*)&catid=/{/preg_placeholder}
I have not tested these, so let me know.
Kind regards,
Luigi
Last edit: 11 years 2 weeks ago by admin.
Please Log in or Create an account to join the conversation.
-
Barbaraamaro
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 5
-
Thank you received: 0
-
-
11 years 2 weeks ago #2279
by Barbaraamaro
Hi,
I've trying the solution and cleaned the cache, but unfortunatly it didn't work.
Thanks.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
11 years 2 weeks ago #2280
by admin
Hi,
to fix the issue I need a temporary backend access or we can schedule a remote support session with Team Viewer. If you want, send me an email at info(at)selfget.com.
Kind regards,
Luigi
The following user(s) said Thank You: Barbaraamaro
Please Log in or Create an account to join the conversation.
Time to create page: 0.166 seconds