Zend Uygulama için Rewritting URL Uygulanması

1 Cevap php

I am doing my first Zend Applicaition and I am finally done with the coding side. But the problem which I have is Client has asked to rewrite the Url's which follows the SEO and as I don't have much knowledge of the Zend Router,I am finding myself helpless this time. Please helo me out.The current Url which I have is...

http://localhost.ZendProject.com/keywords/ball

ve Müşteri gibi ihtiyacı

http://localhost.ZendProject.com/ball

ve başka bir URL (arama URL)

http://localhost.ZendProject.com/search/trends?q=nishant+shrivastava&select=All&Search=Search

ve Client istiyor

http://localhost.ZendProject.com/nishant-shrivastava

1 Cevap

müşteri tarafından birinci ve ikinci talep url aynı olduğu için ben, hiçbir çözüm olduğunu düşünüyorum? Bunu bir anahtar kelime göstermek veya arama isterseniz nasıl Zend Framework bilebilirim?

Birinci yol için size applications.ini bunu ekleyin (ZF 1.8 + kullanıyorsanız) yapabilirsiniz:

resources.router.routes.route_1.route = ":keyword"
resources.router.routes.route_1.defaults.module = "default"
resources.router.routes.route_1.defaults.controller = "keywords"
resources.router.routes.route_1.defaults.action = "index"

This will route http://localhost.ZendProject.com/ball to keywords controller / index action and is providing ball als paramater keyword.