friendly-url

.htaccess mod_rewrite > 500 Internal Server Error

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 09:51:55
I am using .htaccess. My original link is: http://example.com/CareerDays/index.php?u_type=admin And I'm trying to make it look like this: http://example.com/v/admin The entire code looks like this: RewriteEngine On RewriteRule ^v/([^/]*)$ /CareerDays/index.php?u_type=$1 [L] And I always get " 500 Internal Server Error " Nasser When you put configuration directives in a .htaccess file, and you don't get the desired effect, there are a number of things that may be going wrong. Most commonly, the problem is that AllowOverride directive in httpd.conf file is not set such that your configuration

Should I use accented characters in URLs?

随声附和 提交于 2019-11-27 06:57:13
When one creates web content in languages different than English the problem of search engine optimized and user friendly URLs emerge. I'm wondering whether it is the best practice to use de-accented letters in URLs -- risking that some words have completely different meanings with and without certain accents -- or it is better to stick to the usage of non-english characters where appropriate sacrificing the readability of those URLs in less advanced environments (e.g. MSIE, view source). "Exotic" letters could appear anywhere: in titles of documents, in tags, in user names, etc, so they're

Friendly URLs for ASP.NET

谁说胖子不能爱 提交于 2019-11-27 06:16:46
Python frameworks always provide ways to handle URLs that convey the data of the request in an elegant way, like for example http://somewhere.overtherainbow.com/userid/123424/ I want you to notice the ending path /userid/123424/ How do you do this in ASP.NET? This example uses ASP.NET Routing to implement friendly URLs. Examples of the mappings that the application handles are: http://samplesite/userid/1234 - http://samplesite/users.aspx?userid=1234 http://samplesite/userid/1235 - http://samplesite/users.aspx?userid=1235 This example uses querystrings and avoids any requirement to modify the

C# Byte[] to Url Friendly String

痞子三分冷 提交于 2019-11-27 05:22:28
问题 I'm working on a quick captcha generator for a simple site I'm putting together, and I'm hoping to pass an encrypted key in the url of the page. I could probably do this as a query string parameter easy enough, but I'm hoping not too (just because nothing else runs off the query string)... My encryption code produces a byte[], which is then transformed using Convert.ToBase64String(byte[]) into a string. This string, however, is still not quite url friendly, as it can contain things like '/'

Pretty URLs in Google App Engine

强颜欢笑 提交于 2019-11-27 02:14:18
问题 I want to pass a parameter 'A1B2C3' to a GWT application based on Google App Engine. I do it like www.example.com/index.html?key=A1B2C3. Although it's working, I'd like to use pretty URLs. Is it possible to do URL rewriting on Google App Engine? I couldn't find out how. www.example.com/A1B2C3 instead of www.example.com/index.html?key=A1B2C3 I'm using Google App Engine and GWT. All in Java. 回答1: This is a cool question. I figured out how to do it for python as well. app.yaml: - url: /test/(.*)

Using Primary Key / ID Field as an identifier in a URL

自作多情 提交于 2019-11-27 01:46:06
问题 What are the pros and cons of using your databases primary key as a URL identifier? As an example, http://localhost/post/view/13 - 13 being my primary key for my posts table. Some sites like reddit use what I assume is a unique id that is not the primary key but still unique to help identify the link: http://www.reddit.com/r/funny/comments/7ynin/the_mystery_of_irelands_worst_driver/ You can change the last part of the URL to whatever you want as long as the /7ynin/ is the same. Digg seems to

Is there a url rewriting engine for Tomcat/Java?

為{幸葍}努か 提交于 2019-11-27 00:58:35
How can we provide URL-Rewriting support for Tomcat/Java ? mod_rewrite provides this functionality for Apache and can modify URLs even before they reach the handler (e.g. PHP). Is there a similar tool in Java/Tomcat ? To be more specific we need modifications such as http://www.somedomain.com/person/1 Maps to http://www.somedomain.com/details?personId=1 And this should be transparent to the servlet code, i.e. we should be able to access request.getParameter("personId") in the servlet and get the personId (1 in this case). Did you come across such a scenario ? What tool did you use ? Would love

Is a colon `:` safe for friendly-URL use?

こ雲淡風輕ζ 提交于 2019-11-26 21:38:01
We are designing a URL system that will specify application sections as words separated by slashes. Specifically, this is in GWT, so the relevant parts of the URL will be in the hash (which will be interpreted by a controller layer on the client-side): http://site/gwturl#section1/section2 Some sections may need additional attributes, which we'd like to specify with a : , so that the section parts of the URL are unambiguous. The code would split first on / , then on : , like this: http://site/gwturl#user:45/comments Of course, we are doing this for url-friendliness, so we'd like to make sure

PHP .htaccess -> pretty url (in reverse)

巧了我就是萌 提交于 2019-11-26 20:29:36
问题 I know how to make URL's rewrite, for example: www.example.com/index.php?id=1&cat=3 to www.example.com/1/3/ (or whatever). I know that. What I don't know is how on earth to change my whole links in all pages to link to pretty URL's. All my site's links are old fashion ( <a href="index.php?id=1&cat=2"> ) and there are many. I`m asking if someone has an idea or know how to automaticaly redirect to that pretty url if the user click on index.php?id=1. (Almost like this site Stackoverflow if you

Generate SEO friendly URLs (slugs)

删除回忆录丶 提交于 2019-11-26 18:36:53
Definition From Wikipedia : A slug is the part of a URL which identifies a page using human-readable keywords. To make the URL easier for users to type, special characters are often removed or replaced as well. For instance, accented characters are usually replaced by letters from the English alphabet; punctuation marks are generally removed; and spaces (which have to be encoded as %20 or +) are replaced by dashes (-) or underscores (_), which are more aesthetically pleasing. Context I developed a photo-sharing website on which users can upload, share and view photos. All pages are generated