Foren
redirect parameter in URL
Patryk P, geändert vor 12 Jahren.
redirect parameter in URL
New Member Beiträge: 6 Beitrittsdatum: 27.10.09 Neueste Beiträge
Hi there,
I can't find any way not to include redirect parameter in URL of my site.
The problem is:
* I have an asset publisher at the main page of my site. Let's say url: http://example.com/main/
* If I click in the "read more" link, the article gets presented under url:
http://example.com/main/-/asset_publisher/rI3r/content/article-title?redirect=http%3A%2F%2Fexample.com%2Fmain%3Fp_p_id%3D101_INSTANCE_rI3r%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D2
which is mess... Especially when I want to add Facebook like button which needs a permanent url (not changing depending on where you come from).
Can anyone help how to get rid of this?
thanks!
I can't find any way not to include redirect parameter in URL of my site.
The problem is:
* I have an asset publisher at the main page of my site. Let's say url: http://example.com/main/
* If I click in the "read more" link, the article gets presented under url:
http://example.com/main/-/asset_publisher/rI3r/content/article-title?redirect=http%3A%2F%2Fexample.com%2Fmain%3Fp_p_id%3D101_INSTANCE_rI3r%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D2
which is mess... Especially when I want to add Facebook like button which needs a permanent url (not changing depending on where you come from).
Can anyone help how to get rid of this?
thanks!
Hitoshi Ozawa, geändert vor 12 Jahren.
RE: redirect parameter in URL
Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
I'm not too sure if this is what you'll looking for.
http://www.liferay.com/community/wiki/-/wiki/Main/Friendly+URLs;jsessionid=69540A7AEBDC479F692C4C3464F49850.node-1
http://www.liferay.com/community/wiki/-/wiki/Main/FriendlyURLMapper
http://www.liferay.com/community/wiki/-/wiki/Main/Friendly+URLs;jsessionid=69540A7AEBDC479F692C4C3464F49850.node-1
http://www.liferay.com/community/wiki/-/wiki/Main/FriendlyURLMapper
srikanth davuluri, geändert vor 12 Jahren.
RE: redirect parameter in URL
Junior Member Beiträge: 25 Beitrittsdatum: 07.06.11 Neueste Beiträge
Hi Hitoshi Ozawa
i am also facing same problem looking for URLs like below
ex: http://www.liferay.com/home to http://www.srikath.liferay.com
Thanks in advance..
regards
Srikanth Davuluri.
i am also facing same problem looking for URLs like below
ex: http://www.liferay.com/home to http://www.srikath.liferay.com
Thanks in advance..
regards
Srikanth Davuluri.
Samuel Kong, geändert vor 12 Jahren.
RE: redirect parameter in URL
Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
The redirect parameter is optional and is only used for the "«Back" link. So for Facebook, you can just use
http://example.com/main/-/asset_publisher/rI3r/content/article-title
http://example.com/main/-/asset_publisher/rI3r/content/article-title
Patryk P, geändert vor 12 Jahren.
RE: redirect parameter in URL
New Member Beiträge: 6 Beitrittsdatum: 27.10.09 Neueste Beiträge
Hitoshi, Samuel - thanks for replies.
Samuel got it right. I'm glad it's optional. How to disable it?
The problem is I don't want this redirect parameter in url. If you use Facebook FBML it gets url of current page (you don't specify it explicitly). And it happens that you get to the specific article from different places, and thus have different urls for the same article (different redirect parameter values).
So it ends up that for the article you get:
5 FB likes for this url:
http://example.com/main/-/asset_publisher/rI3r/content/article-title?redirect=http%3A%2F%2Fexample.com%2Fmain%3Fp_p_id%3D101_INSTANCE_rI3r%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D2
7 FB likes for this url:
http://example.com/main/-/asset_publisher/rI3r/content/article-title?redirect=http%3A%2F%2Fexample.com%2F__OTHERSOURCE__%3Fp_p_id%3D101_INSTANCE_rI3r%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D2
When you SHOULD get 12 FB likes for this url:
http://example.com/main/-/asset_publisher/rI3r/content/article-title
Samuel got it right. I'm glad it's optional. How to disable it?
The problem is I don't want this redirect parameter in url. If you use Facebook FBML it gets url of current page (you don't specify it explicitly). And it happens that you get to the specific article from different places, and thus have different urls for the same article (different redirect parameter values).
So it ends up that for the article you get:
5 FB likes for this url:
http://example.com/main/-/asset_publisher/rI3r/content/article-title?redirect=http%3A%2F%2Fexample.com%2Fmain%3Fp_p_id%3D101_INSTANCE_rI3r%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D2
7 FB likes for this url:
http://example.com/main/-/asset_publisher/rI3r/content/article-title?redirect=http%3A%2F%2Fexample.com%2F__OTHERSOURCE__%3Fp_p_id%3D101_INSTANCE_rI3r%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D2
When you SHOULD get 12 FB likes for this url:
http://example.com/main/-/asset_publisher/rI3r/content/article-title
Samuel Kong, geändert vor 12 Jahren.
RE: redirect parameter in URL
Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
If you want to remove the redirect parameter, you will need to create a JSP Hook and modify the JSP pages.
Patryk P, geändert vor 12 Jahren.
RE: redirect parameter in URL (Antwort)
New Member Beiträge: 6 Beitrittsdatum: 27.10.09 Neueste Beiträge
Thanks for your help!
For those who would like to do the same thing, you need to override:
html\portlet\asset_publisher\abstracts.jsp
the function that adds redirect parameter is called _checkViewURL() so you need to comment out the line:
viewURL = _checkViewURL(viewURL, currentURL, themeDisplay);
For those who would like to do the same thing, you need to override:
html\portlet\asset_publisher\abstracts.jsp
the function that adds redirect parameter is called _checkViewURL() so you need to comment out the line:
viewURL = _checkViewURL(viewURL, currentURL, themeDisplay);
Amit Doshi, geändert vor 10 Jahren.
RE: redirect parameter in URL
Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
Hi All,
Sorry to dig into old thread, but I am facing similar issue.
My URL is
http://localhost:8083/web/guest/home/-/asset_publisher/Yxf9G3NnredU/document/id/79431?redirect=http%3A%2F%2Flocalhost%3A8083%2Fweb%2Fguest%2Fhome%3Fp_p_id%3D101_INSTANCE_Yxf9G3NnredU%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D1
I want to remove extra parameter from the url, I want to make it as
http://localhost:8083/web/guest/home/-/asset_publisher/Yxf9G3NnredU/document/id/79431?redirect=http%3A%2F%2Flocalhost%3A8083%2Fweb%2Fguest%2Fhome,
I like to remove below parameters.
p_p_col_id
p_p_col_count
p_p_mode
p_p_state
p_p_lifecycle
I am ready to go into the EXT but I don't know what pattern I should write in the asset-publisher-friendly-url-routes.xml
Any help would be great
Thanks & Regards,
Amit D.
Sorry to dig into old thread, but I am facing similar issue.
My URL is
http://localhost:8083/web/guest/home/-/asset_publisher/Yxf9G3NnredU/document/id/79431?redirect=http%3A%2F%2Flocalhost%3A8083%2Fweb%2Fguest%2Fhome%3Fp_p_id%3D101_INSTANCE_Yxf9G3NnredU%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D1
I want to remove extra parameter from the url, I want to make it as
http://localhost:8083/web/guest/home/-/asset_publisher/Yxf9G3NnredU/document/id/79431?redirect=http%3A%2F%2Flocalhost%3A8083%2Fweb%2Fguest%2Fhome,
I like to remove below parameters.
p_p_col_id
p_p_col_count
p_p_mode
p_p_state
p_p_lifecycle
I am ready to go into the EXT but I don't know what pattern I should write in the asset-publisher-friendly-url-routes.xml
Any help would be great
Thanks & Regards,
Amit D.
Dhrutika Vyas, geändert vor 10 Jahren.
RE: redirect parameter in URL
Expert Beiträge: 435 Beitrittsdatum: 09.02.09 Neueste Beiträge
Hi Amit,
You may need to overwrite xml file for this. Look into below thread.
http://www.liferay.com/community/forums/-/message_boards/message/8177475
Regards,
Dhruitka
You may need to overwrite xml file for this. Look into below thread.
http://www.liferay.com/community/forums/-/message_boards/message/8177475
Regards,
Dhruitka