heinzawhtet — 2013-04-09T04:44:55-04:00 — #1
I am creating a blog with MVC Pattern. One blog post URL would be example.com/view/unique-name. But I want to rewrite that URL to following format.
jeff_mott — 2013-04-09T07:11:30-04:00 — #2
I don't think this is a job for htaccess rewrite rules. You'll have to do this within your application's router. And you'll want to try this route last, since "unique-name" could be most anything and override your other site URLs.
heinzawhtet — 2013-04-09T13:19:05-04:00 — #3
I use Laravel 4. If I set routes like so-
When user visit
for Category Page, router will thinks "
" is "category".
It will work if I set second Route in front of the first. But I have to set other routes for another custom pages.
Please help me.
jeff_mott — 2013-04-09T13:29:00-04:00 — #4
You'll have to put the "uniqueName" route last. It has to be the last route your application tries. Otherwise it could override any other route.
dklynn — 2013-04-14T06:31:46-04:00 — #5
It can be done ... provided your CMS can accept the altered URI. Since I'm not aware of any that can, I'd recommend against it.