[Logo] JForum - Powering Communities
  [Search] 搜尋   [Recent Topics] 最新主題   [Hottest Topics] 熱門主題   [Top Downloads] 熱門下載   [Groups] 回首頁 
[Register] 會員註冊 /  [Login] 登入 


JForum 2.8.3 is out with various fixes and improvements. Read all about it here

How to create Dynamic Url in Jforum ? RSS feed
討論區首頁 » User Forum
發表人 內容
subodh


註冊時間: 2014/8/26
文章: 1
離線
Right now url look like [http://jforum.andowson.com/posts/list/96.page] i want to know how can we create google friendly Url like [http://jforum.andowson.com/posts/list/Captcha is not showing in servere]

How can we create dynamic Urls

Thanks
andowson


註冊時間: 2011/6/30
文章: 250
離線
If you put Tomcat behind Apache HTTPD Server, then you can use Apache's rewrite module with some rewrite rule like the following in httpd.conf:
RewriteRule ^/posts/list/t/([1-9]+[0-9]*)/(.*)$ /posts/list/$1.page [P]

Notice that /posts/list/t/ prefix is used to distinguish from normal url ended with .page
And you can use the syntax to create it in freemarker template
/posts/list/t/${topic.topicId}/${topic.topicTitle?html}

For example:
http://jforum.andowson.com/posts/list/t/114/JForum 2.4.0 released

Or you can shorten the prefix from /posts/list/t/ to /t/ only
RewriteRule ^/t/([1-9]+[0-9]*)/(.*)$ /posts/list/$1.page [P]

And you can use the syntax to create it in freemarker template
/t/${topic.topicId}/${topic.topicTitle?html}

For example:
http://jforum.andowson.com/t/114/JForum 2.4.0 released

 
討論區首頁 » User Forum
前往:   
行動版
Powered by JForum 2.8.3 © 2023 JForum Team • Maintained by Andowson Chang and Ulf Dittmer