skip to Main Content

Friendly URL with Apache Mod-Rewrite

Been reading about this for a while now and I'm close but struggling with the final hurdle. I have a url like this: site.com/detail/123/some-description/maybe-some-more-description that I want to become site.com/details.php?id=123 I've got this so far RewriteRule detail/(.*)/.*$ details.php?id=$1 which according…

VIEW QUESTION

URLs rewrite using regex pattern – Apache

I need to rewrite URL's using .htaccess to redirect all users from old sitemap to the new URL's. The old URLs looks like this: http://server.linux.example.com/a/v/c/document_title1.php http://server.linux.example.com/jp/x/1/o/document_title32.php http://server.linux.example.com/kr/a/a/2/document_title12343.php http://server.linux.example.com/cn/6/z/z/document_title124.php I need to keep first directory and then remove all sub-directories, including…

VIEW QUESTION

.htaccess 301 Path URL Restructure? – Apache

I read a lot on 301 redirects of full domains, but couldn't get how to exactly change an existing path to a new one. Here is an example: site.com/cars to site.com/motobikes And: site.com/cars/tires to sote.com/motobikes/(variable ex. Berlin, Paris)/tires How can…

VIEW QUESTION

Spring @RequestMapping "Not Contains" Regex – SEO

I have this RequestMapping: @RequestMapping(value = "/route/to-{destination}-from-{departure}.html", method = {RequestMethod.GET, RequestMethod.HEAD}) And I would like to add that RequestMapping: @RequestMapping(value = "/route/to-{destination}.html", method = {RequestMethod.GET, RequestMethod.HEAD}) So it can serve all the "without departure" routes. That, however, creates a conflict…

VIEW QUESTION
Back To Top
Search