Questions tagged [url-mapping]

A framework's URL mapping facility is the mechanism by which the framework interprets URLs.

The frameworks match the provided URLs against pre-determined patterns using regular expressions, or use URL rewriting to translate the provided URL into one that the underlying engine will recognize. Another technique is that of graph traversal, where a URL is decomposed in steps that traverse an object graph (of models and views).

A URL mapping system that uses pattern matching or URL rewriting allows more "SEO friendly URLs" to be used, increasing the simplicity of the site and allowing for better indexing by search engines. This makes the URL easier for people to read and hand write, and provides search engines with better information about the structural layout of the site. A graph traversal approach also tends to result in the creation of SEO friendly URLs.

363 questions
3
votes
1 answer

Grails dynamic url rewriting

I am trying to rewrite my urls for a particular controller (and action) for example: www.mysite.com/user/search?sex=male&from_age=18&to_age=19 would become www.mysite.com/user/search/sex/male/from_age/18/to_age/19 I know I could do this using…
user404345
3
votes
1 answer

How to point another domain to specific path on an existing website in IIS 7.5?

So i have an existing site running fine in IIS, let's call this domain www.mysite.com. Now there is a folder on the site that is basically a sub-site, that folder is 'foundation'. So I need to point an additional domain at this folder, the…
cardiac7
  • 491
  • 1
  • 9
  • 26
3
votes
1 answer

page not found on jsp submission

here is my test.jsp placed at webcontent/jsp/ Insert title here
3
votes
2 answers

Create "pretty" user profile URLs in Grails application

Anybody who already have implemented something similar using Grails could tell me please which are the good pratices (if there are any) to create user profile URLs with the format "http://www.myservice.com/username", as in Facebook, Twitter,…
Uilian
  • 656
  • 8
  • 19
3
votes
3 answers

Grails: How do I map a 404 with /**

I've tried to create a custom 404 url mapping for URL's that are not found: "/test" { controller="test" } "404" { controller="application" action="send404" } "500" { controller="application" action="send500" } But for some…
sparkyspider
  • 13,195
  • 10
  • 89
  • 133
3
votes
1 answer

Spring MVC and RequestMapping with filter

I am having a problem with url mappings and thought somebody might help me :-) My Spring MVC application has a dispatcherServler's mapping as follows: dispatcherServlet
3
votes
1 answer

.htaccess capture the current url & take the url as query string to a page

I want to capture the url via .htaccess & send that url as a query string to the page which will check the existence of the url from the DB. So my problem is i have a old site with www.example.org & this has 4200 old links that should be mapped…
Vijay Kumbhar
  • 896
  • 1
  • 13
  • 31
3
votes
2 answers

Grails: How to serve different responses to error 500 depending on format (JSON, HTML)?

I'm trying to serve different responses in Grails when an error 500 happens depending on the format of the request. I've created an ErrorController and I'm using it in the URLMappings but I'm not getting the right request format: def handle() { …
chozero
  • 411
  • 6
  • 12
3
votes
4 answers

Spring MVC 3 - optional URL parameter

I've written following code: @Controller @RequestMapping("/page{number}") public class IndexController { @RequestMapping(method = RequestMethod.GET) public String printIndex(ModelMap model, @PathVariable int number) { String…
Adrian Adamczyk
  • 3,000
  • 5
  • 25
  • 41
3
votes
1 answer

JSP servlet mapping

With introduction of Servlet 3.0 we could map servlets to URL patterns using annotations and ommiting mapping within web.xml. I wonder if there some intstructions or special tags allowing mapping jsp to URL in page code without declaring servlets in…
Odomontois
  • 15,918
  • 2
  • 36
  • 71
3
votes
3 answers

How to define url placeholder $1 for htaccess regex

I wrote the following in htaccess in the process of learning: RewriteRule ^/test(a-zA-z)\.htm$ /test$1.htm And test2.htm still gets mapped to test1.htm I'm assuming the $1 is not being treated as the variable placeholder properly because $ is not…
bcm
  • 5,470
  • 10
  • 59
  • 92
3
votes
1 answer

How to get url parameters in grails spring security custom UserDetailsServices class?

I have two login pages, one for user and other for admin. In order to know who is trying to login, I think of having a url pattern like /app/admin/login and /app/user/login. I cannot change by subdomain. This is a grails application which uses…
user235273
3
votes
1 answer

How to make home page as default page in asp.net

How can i set default home page in asp web.config file. i have already written this code : and also tried this …
j4m4l
  • 328
  • 2
  • 10
  • 22
2
votes
2 answers

How to override URL mapping taken by a plugin in Grails 4?

In Grails 3.3 I was using a custom extension of RestOauthController from spring-security-rest:2.0.0.M2 plugin, which I'd overriden in UrlMappings.groovy like this: "/oauth/access_token"(controller: "restOauthMy", action: "accessToken", method:…
andysh
  • 339
  • 1
  • 15
2
votes
1 answer

Dynamic URL REWRITING for QueryStrings

hello please help me for this question i have the following url --> www.sample.com/news.aspx?id=45 i want pass "id" in the query string to news.aspx and show this news, but due to url rewriting the url is changed to this -->…
user758845
  • 23
  • 1
  • 3