friendly-url

Clean URLs using jsp/ servlets?

放肆的年华 提交于 2019-12-06 06:33:29
问题 I am planning to make a CMS using jsp and servlets. Could anyone tell me how to implement clean urls using this technologies? 回答1: You could try using urlrewritefilter: http://code.google.com/p/urlrewritefilter/. This uses a servlet filter and an xml-file to allow your application to have clean url's. The construction of the clean url's would be your own responsibility. 回答2: Make use of HttpServletRequest#getPathInfo() in the servlet which is acting as front controller. Kickoff example

Descriptive URLs vs. Basic URLs

一个人想着一个人 提交于 2019-12-06 02:00:27
I have a website and I'm employing Clean URLs to all of the links. I'm wondering what the opinion is about short, basic URLs versus longer, descriptive URLs. For instance, if my website was about Georgia Bulldog football news, which would be better for SEO purposes? http://www.example.com/news or http://www.example.com/georgia-bulldog-football-news I've read quite a bit, but I'm torn on the simple vs. descriptive factor. Can anyone give opinions based on SEO experience? The descriptive format, as the search engine can pick up keywords inside the URL. Apart from that, I don't think there's much

FriendlyURLs - RouteData returns no value

末鹿安然 提交于 2019-12-05 12:31:45
I installed the Microsoft.Asp.Net.FriendlyUrls.Core.dll via NuGet to an existing asp.net 4.5 webforms website. I have the following in the RouteConfig file public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); routes.MapPageRoute("frUrl", "frurltest/{id}", "~/frurltest.aspx"); } **Global.asax** void Application_Start(object sender, EventArgs e) { RouteConfig.RegisterRoutes(System.Web.Routing.RouteTable.Routes); } In the frurltest.aspx I try to get the "id"

SEO Friendly URL Rewriter Parameters

馋奶兔 提交于 2019-12-05 09:39:59
I would appreciate you advice on how to incorporate parameters into SEO Friendly URLs We have decided to have the "techie" parameters first, followed by the "SEO Slug" \product\ABC123\fly-your-own-helicopter much like S.O. - if the SEO Slug changes, or is truncated, or missing, we still have the Product and ABC123 parameters; various articles say that having such extra data doesn't harm SEO ranking. We need to have additional parameters; we could use "-" to separate parameters as it makes them look similar to the SEO Slug, or we could/should use something else? \product\ABC123-BOYTOY-2\boys

Remove faces servlet url pattern and page extension from url

你说的曾经没有我的故事 提交于 2019-12-05 00:51:28
问题 i have a command link in my page which looks like: <h:commandLink value="Add user" action="add?faces-redirect=true" /> and when i click it, it goes to url: http://localhost:8080/myapp/faces/add.xhtml but i want the url to be: http://localhost:8080/myapp/add how to do that ? i am using spring 3, jsf 2 this is my web.xml : <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com

Relative paths from file for img, a and header

北战南征 提交于 2019-12-04 20:53:26
I have a dynamic website that can be accessed as domain/categories or domain/categories/article, and it redirects to domain/index.php?category/article. The problem I'm facing is that I want to use relative paths from the files. I managed to do that for includes with dirname( FILE ), as in ini_set('include_path', dirname(__FILE__) . '/include'); This works fine. Depending on the directory I will change it to, and it also works ini_set('include_path', dirname(__FILE__) . '/../include'); (extra /../) But if I try to do the same with img src, A href or php Header, while I get the correct file path

Make friendly URL in ASP.NET

怎甘沉沦 提交于 2019-12-04 19:31:00
how do i make my web app friendly URL? currently my app URL looks like this http://www.domain.com/Page.aspx?article=103 but I would like to display the URL to look like this http://www.domain.com/Page.aspx?Google-likes-url-friendly what would i need to do? check out http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/ you will need to download and install a module. Pretty easy to use and configure. Here is the introduction : http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module/ Look into using ASP.NET MVC. With it, you could have a URL that's even

Pretty URL's for web application

荒凉一梦 提交于 2019-12-04 19:09:44
I'm aware that there are a hundred articles, tutorials and manuals on Mod Rewrite but i tend to learn better by examples, so all i'm asking is for a quick pretty url conversion and i'll be on my way (so i can dissect exactly what its doing, so i can apply it to others) I have this URL: http://www.example.com/single.php?id=1 Now it would be great if it could follow the same convention as Stack Overflow where the id=1 is the actual title of the page. I have the title in a PHP variable if thats any help? I would be grateful if someone could turn the above into: http://www.example.com/single/here

PHP + HTACCESS + mod_rewrite + different length url segments

本秂侑毒 提交于 2019-12-04 17:17:24
Right, Good afternoon all (well, it is afternoon here in the UK!) I am in the process of writing a (PHP/MySQL) site that uses friendly URLs. I have set up my htaccess (mod_rewrite enabled) and have a basic script that can handle "/" and then everything else is handled after "?" in the same script. I.e. I am able to work out whether a user has tried to put example.com/about , example.com/about/the-team or example.com/join/?hash=abc123etc etc. My question is how do I handle variable length URLs such as (examples): example.com/about (node only) example.com/about/the-team (node + seo-page-title)

Mask URL in JSF

孤者浪人 提交于 2019-12-04 16:25:09
I have an enterprise application written in JAVA with JSF (using RichFaces 3.3). Currently my URL looks like this: http://localhost/WebApplication/faces/folder1/page.jsp Question is how do I mask my url to make it like this: http://localhost/folder1/page.jps Basically i want to hide "Application/faces/" Thanks For rewriting URLs within your application you can use UrlRewrite . However, in this case it looks like you want to remove your web application's context path, in which case you have two options: deploy your application to the context path / (how is application server-specific) run