Foren
Friendly URL for blog
Hardik Sanghani, geändert vor 7 Jahren.
Friendly URL for blog
Junior Member Beiträge: 40 Beitrittsdatum: 16.02.15 Neueste Beiträge
hi,
I have created friendly url using ext.
http://localhost:8080/web/test/blog/-/blogs/how-to-create-hook
so I need url like
http://localhost:8080/web/test/blog/how-to-create-hook
Anyone has idea?
Thank you
Hardik
I have created friendly url using ext.
http://localhost:8080/web/test/blog/-/blogs/how-to-create-hook
so I need url like
http://localhost:8080/web/test/blog/how-to-create-hook
Anyone has idea?
Thank you
Hardik
Samuel Kong, geändert vor 7 Jahren.
RE: Friendly URL for blog
Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
First off, you don't need to use the Ext to get that first friendly URL. You should get that friendly URL out of the box.
For the second URL, you can't really do this. The problem is the portal will think the user is request the page /blog/how-to-create-hook instead of the page /blog.
For the second URL, you can't really do this. The problem is the portal will think the user is request the page /blog/how-to-create-hook instead of the page /blog.
Hardik Sanghani, geändert vor 7 Jahren.
RE: Friendly URL for blog
Junior Member Beiträge: 40 Beitrittsdatum: 16.02.15 Neueste Beiträge
hi Samuel Kong,
Thanx for reply.
Thanx for reply.
Hardik Sanghani, geändert vor 7 Jahren.
RE: Friendly URL for blog
Junior Member Beiträge: 40 Beitrittsdatum: 16.02.15 Neueste Beiträge
hi
I am thinking is if I create url like "http://localhost:8080/web/test/blog/how-to-create-hook" and then I redirect to actual url using url rewrite then will it work ?
I am thinking is if I create url like "http://localhost:8080/web/test/blog/how-to-create-hook" and then I redirect to actual url using url rewrite then will it work ?
Samuel Kong, geändert vor 7 Jahren.
RE: Friendly URL for blog
Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
Yes, you can do that.
Hardik Sanghani, geändert vor 7 Jahren.
RE: Friendly URL for blog
Junior Member Beiträge: 40 Beitrittsdatum: 16.02.15 Neueste Beiträge
Thanx for reply,
Yes I found in urlrewrite like
It should work for blog too, Can you give some brief idea how can I change blog url ?
Yes I found in urlrewrite like
<rule>
<from>^/web/guest/community/forums/message_boards(.*)$</from>
<to type="permanent-redirect">/web/guest/community/forums/-/message_boards$1</to>
</rule>
<rule>
<from>^/web/guest/home/journal/rss/14/news$</from>
<to type="permanent-redirect">/web/guest/home/-/journal/rss/14/news</to>
</rule>
It should work for blog too, Can you give some brief idea how can I change blog url ?
Samuel Kong, geändert vor 7 Jahren.
RE: Friendly URL for blog
Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
This is outside of Liferay, so you can probably check the documentation for your web server.