url-redirection

How to turn Html.BeginForm into Ajax.BeginForm

只愿长相守 提交于 2021-02-19 03:30:40
问题 The following works, but how do I convert this to an Ajax Call? <section id="loginWindow"> @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl })) { @Html.AntiForgeryToken() @Html.ValidationSummary(true) <fieldset> <legend>Log in Form</legend> <ol> <li> @Html.LabelFor(m => m.UserName) @Html.TextBoxFor(m => m.UserName) @Html.ValidationMessageFor(m => m.UserName) </li> <li> @Html.LabelFor(m => m.Password) @Html.PasswordFor(m => m.Password) @Html.ValidationMessageFor(m

How to redirect in “NEW” tab with meta

时光毁灭记忆、已成空白 提交于 2021-02-08 10:00:16
问题 Ho can we redirect a page in new tab when we use meta tag. For ex. i am trying this code <meta http-equiv="refresh" content="5;URL=http://www.example.com > but it redirects it in same page. And if i add the following code after the url then also nothing happens target = "_blank" Please help me. 回答1: You can try something like this: <meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_blank');"> This post is related to your question. 回答2: When I try this I

How to redirect in “NEW” tab with meta

廉价感情. 提交于 2021-02-08 09:59:01
问题 Ho can we redirect a page in new tab when we use meta tag. For ex. i am trying this code <meta http-equiv="refresh" content="5;URL=http://www.example.com > but it redirects it in same page. And if i add the following code after the url then also nothing happens target = "_blank" Please help me. 回答1: You can try something like this: <meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_blank');"> This post is related to your question. 回答2: When I try this I

How to redirect in “NEW” tab with meta

北慕城南 提交于 2021-02-08 09:57:27
问题 Ho can we redirect a page in new tab when we use meta tag. For ex. i am trying this code <meta http-equiv="refresh" content="5;URL=http://www.example.com > but it redirects it in same page. And if i add the following code after the url then also nothing happens target = "_blank" Please help me. 回答1: You can try something like this: <meta http-equiv="refresh" content="5; URL=javascript:window.open('http://google.com','_blank');"> This post is related to your question. 回答2: When I try this I

Remove all folder name form url

☆樱花仙子☆ 提交于 2021-02-05 09:18:30
问题 Recently I have installed my site into a sub-folder of root of server. So To remove folders name from URL i have used following htaccess code. Options -Indexes RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?hostname.com$ RewriteRule ^(/)?$ user/site1/index.php [L] But the problem is that i am, also able to access my site Via hostname.com/user/site1 How can i stop user accessing my site via "hostname.com/user/site1" Please help 回答1: You can have a new redirect rule for this: Options

Remove all folder name form url

泄露秘密 提交于 2021-02-05 09:18:26
问题 Recently I have installed my site into a sub-folder of root of server. So To remove folders name from URL i have used following htaccess code. Options -Indexes RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?hostname.com$ RewriteRule ^(/)?$ user/site1/index.php [L] But the problem is that i am, also able to access my site Via hostname.com/user/site1 How can i stop user accessing my site via "hostname.com/user/site1" Please help 回答1: You can have a new redirect rule for this: Options

.htaccess redirect with URL friendly (mod_rewrite)

独自空忆成欢 提交于 2021-01-28 21:26:11
问题 I'm using RewriteRule in my URLs RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/([^/]+)/?$ index.php?lang=$1&page=$2 [L,QSA,NC] Now I need to create a 301 redirect. So I do that: Redirect 301 /port/reestruturacao-financeira http://website.com/port/reestruturacao-corporativa/ The result is wrong: http://website.com/port/reestruturacao-corporativa//?lang=port&page=reestruturacao-financeira How can I fix that? redirect http://website.com/port

Redirect with nginx (remove substring from url)

半世苍凉 提交于 2021-01-27 19:11:25
问题 I want do a redirect from old url: http://example.org/xxxxxxxxx.html To new urls (remove ".html") http://example.org/xxxxxxxxx How I can do this with nginx? EDIT : xxxxxxxxx can be differ, example: http://example.org/url-1.html redirect to http://example.org/url-1 http://example.org/another-url.html redirect to http://example.org/another-url 回答1: location ~ ^(.*)\.html$ { return 301 $1; } 回答2: Probably you need a rewrite statement location /xxx.html { rewrite ^/xxx(.*) http://example.org