friendly-url

Make friendly URL in ASP.NET

浪尽此生 提交于 2019-12-13 12:18:59
问题 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? 回答1: 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

Friendly URL in MODX redirects to home page

空扰寡人 提交于 2019-12-13 11:27:32
问题 I'm trying to use the User-Friendly-URL feature of MODX Revolution v2.2.14-pl (sdk) to eliminate the .html extension from the URL. An already clean URL redirects to the home page rather than showing the correct page. Why does the first URL redirect to the home page? /modx_revolution/zwei/ shows 'Home' page /modx_revolution/zwei.html shows correct page I've read that until the MODX and Browser caches are emptied the changed pages can only be viewed with the Preview function, which gives the

how to “rewrite rule” for a sub-sub-directory? .htaccess/php

☆樱花仙子☆ 提交于 2019-12-13 07:00:34
问题 I have one folder named test located at www.mydomain.com/abc/files/test. I need to change the URLs from www.mydomain.com/abc/files/test/test.php?id=15&key=some-text123 to www.mydomain.com/abc/files/test/15/some-text123 this is similiar to SO urls. I tried following in .htaccess file with following code RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteRule ^test/([0-9]+)/([A-Za-z0-9-]+)?$ test/test.php?id=$1&key=$2 [R] It redirects me to www.mydomain.com/test/test.php?id=15&key

htaccess redirect for dynamic urls not working

孤人 提交于 2019-12-13 05:29:13
问题 I basically want: http://example.com/index.php?page=abc to redirect to http://www.exmaple.com/abc I have: RewriteCond %{QUERY_STRING} ^page=(.*)$ RewriteRule ^index.php$ %1? [R=301] RewriteRule ^%1$ index.php?page=%1 [L] 回答1: Some syntax issues in your 2nd rule and logic ones in your 1st rule. Following should work: RewriteEngine On # for external redirection from `/index.php?page=abc` to `/abc` RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php\?page=([^\s&]+) [NC] RewriteRule ^ /%1? [R=301

How can I make my urls friendly from this example?

余生长醉 提交于 2019-12-13 03:09:20
问题 My site currently displays like this (when clicking on an ad): hxxp://mysite.com/viewItem.php?id=10 I would LOVE for the urls to read: hxxp://mysite.com/dogs/121/border-collie-for-sale-to-good-home where "dogs" is forever a constant, 121 is always the $row['postId']; and "border-collie-for-sale-to-good-home" is always my $row['title']; I know it probably won't be so easy as a quick answer here but would appreciate it if you could get me going in the right direction. I'm assuming a change to

Form method = “get” pretty URL

为君一笑 提交于 2019-12-12 17:47:54
问题 So I'm using this HTML form for a simple search field <form action = "/search/" method = "get"> <input type = "text" name = "search_term"/> </form> But then when it processes in the URL it's like this http://mysite.com/search/?search_term=something I know this is perfectly normal, but is there a way to get it to send like this? http://mysite.com/search/something I will then use .htaccess in the search directory to rewrite the url. 回答1: Do you want just the URL to be pretty or you want the

SEO friendly URL how to best way

这一生的挚爱 提交于 2019-12-12 10:17:54
问题 I have url like the follow: http://new2.silentdivers.com/links.php?lang=en What will be the best way to do SEO freindly URL? Any help needed. lang=en could be, lang=ge, lang=fr etc 回答1: In my opinion the most important thing is that you need to understand that language should be only URL(and/or domain) based. Meaning URL I mean your script should always check only url and take decision what language is chosen. Many people misunderstand it and use cookies or sessions to check them and to

Removing .php extension from URLs using .htaccess? [duplicate]

扶醉桌前 提交于 2019-12-12 10:15:36
问题 This question already has answers here : Remove .php extensions with .htaccess without breaking DirectoryIndex (3 answers) Closed 6 years ago . Is it possible to remove the .php part from all of my URLs using a .htaccess file? Two examples: http://url.com/home.php http://url.com/shops.php Become: http://url.com/home/ http://url.com/shops/ All the help would be massively appreciated. 回答1: This should work: RewriteEngine On RewriteRule \/([^\/]+)\/$ $1.php It will serve you the file named after

What is a good way to have a SEO URL system built up in PHP?

安稳与你 提交于 2019-12-12 07:41:56
问题 I want to have "pretty" and SEO oriented URLs in my site. I've build up my own tiny framework for this site and almost everything is complete now. One thing I'm still puzzled up is the pretty/SEO URLs system that I will use. I know there's many way to achieve this and I'm looking to balance best practices/ease of implementation on this one. So far I'm thinking to have all URLs of the site to point to a specific PHP file (let's say index.php) that will contain a file/URL dictionary that will

Add Friendly URLs to Multi lingual ASP.NET website, without using MVC

不打扰是莪最后的温柔 提交于 2019-12-12 06:44:14
问题 I have a project developed in ASP.NET webforms, the project has content in 2 different languages which can be selected from a dropdownlist, that project is available for download from the following link: http://www.mediafire.com/download/4d7dbdthh2094s6/test-idiomas-urls.rar I need that when I select any of the languages, the URL change from this: example.com/Default.aspx to this: example.com/en/home or example.com/es/home. I have excluded ASP.NET MVC. How could I make that work? 回答1: