Foros de discusión

Friendly URL for blog

Hardik Sanghani, modificado hace 7 años.

Friendly URL for blog

Junior Member Mensajes: 40 Fecha de incorporación: 16/02/15 Mensajes recientes
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
thumbnail
Samuel Kong, modificado hace 7 años.

RE: Friendly URL for blog

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
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.
Hardik Sanghani, modificado hace 7 años.

RE: Friendly URL for blog

Junior Member Mensajes: 40 Fecha de incorporación: 16/02/15 Mensajes recientes
hi Samuel Kong,

Thanx for reply.
Hardik Sanghani, modificado hace 7 años.

RE: Friendly URL for blog

Junior Member Mensajes: 40 Fecha de incorporación: 16/02/15 Mensajes recientes
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 ?
thumbnail
Samuel Kong, modificado hace 7 años.

RE: Friendly URL for blog

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
Yes, you can do that.
Hardik Sanghani, modificado hace 7 años.

RE: Friendly URL for blog

Junior Member Mensajes: 40 Fecha de incorporación: 16/02/15 Mensajes recientes
Thanx for reply,

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 ?
thumbnail
Samuel Kong, modificado hace 7 años.

RE: Friendly URL for blog

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
This is outside of Liferay, so you can probably check the documentation for your web server.