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.
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.
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.
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.
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.
This topic is now closed. New replies are no longer allowed.