url-rewriting

Is it possible to rewrite subfolder to subdomain with IIS7?

本小妞迷上赌 提交于 2019-12-11 08:37:00
问题 I have an asp.net application on sub domain sub.domain.com I want to access this application by typing www.domain.com/sub is it possible with IIS7? 回答1: Assuming you're happy to manually configure the application at each subdomain: In IIS Manager, go to Sites, and select your www.domain.com site. Right click it, "Add Application" and specify the alias "sub" and point the physical path to the same location as sub.domain.com Select the same application pool as the sub.domain.com site.

Configure URL Rewrite using server variable to support multiple origins

亡梦爱人 提交于 2019-12-11 08:30:59
问题 I was dealing with CORS issue a couple days ago where I need to support multiple origins. I did some research and found a couple posts pointing me to this great tool (URL Rewrite). I got the solution I wanted following Paco Zarate tip here: Access-control-allow-origin with multiple domains using URL Rewrite. I also found another post here: http://www.carlosag.net/articles/enable-cors-access-control-allow-origin.cshtml showing me how to achieve the same solution with a different method of

How to stop htaccess rewrite rule carrying over query string

こ雲淡風輕ζ 提交于 2019-12-11 08:22:51
问题 I am setting up some redirects. I want to redirect the following URL: /cms/index.php?cat_id=2 to the following URL: /flash-chromatography The rule I currently have is as follows: RewriteCond %{QUERY_STRING} ^cat_id=2$ [NC] RewriteRule ^cms/index\.php$ /flash-chromatography [L,R=301] This rule is almost perfect apart from it redirect the URL to the following: /flash-chromatography?cat_id=2 So you see my problem is it has kept the ?cat_id=2 part when I don't want it to. How do I stop it keeping

307 redirect rule with Microsoft Rewrite Module 2.0

荒凉一梦 提交于 2019-12-11 08:10:07
问题 Is it possible to make a 307 redirect rule in web.config with Microsoft Rewrite Module 2.0 for IIS 7? The goal is to redirect some post form requests to another path within the same domain. 回答1: Set redirectType attribute of action tag to "Temporary" Eg. <rewrite> <rules> <rule name="RedirectRule" stopProcessing="true"> <match url="(.*)" ignoreCase="true" /> <action type="Redirect" url="http://www.newdomain.com/{R:1}" redirectType="Temporary" /> <conditions> <add input="{HTTP_HOST}" pattern=

RedirectMatch old product urls (without ID) to new url with basic (using ID) structure

独自空忆成欢 提交于 2019-12-11 08:07:27
问题 I'am facing a problem with our PrestaShop 1.7.5 installation. About 2 weeks ago, I tried to upgrade our PrestaShop version (from 1.7.4 to 1.7.5). Unfortunately 1 important module is not working any longer (override of the dispatcher is outdated), this module generates SEO-friendly URLs, without ID's in the URL, like this: domain/{category}/{rewrite} We prefer to do no roll-back and are considering two options. Option 1: Redirect all old product URLs to the new URLs Old url format: domain/

Wordpress url rewrite on nginx when wordpress is not in the main directory

一曲冷凌霜 提交于 2019-12-11 07:55:41
问题 For some reason I always have trouble getting Wordpress to work on nginx. I have my Wordpress installation in the folder "site" (inside public_html). This is my nginx configuration: server { server_name www.wouterds.be wouterds.be; access_log /srv/www/www.wouterds.be/logs/access.log; error_log /srv/www/www.wouterds.be/logs/error.log; location / { root /srv/www/www.wouterds.be/public_html; index index.php index.html index.htm; try_files $uri $uri/ /site/index.php?$args; autoindex on; }

IIS7 rewrite http and http://www to https

和自甴很熟 提交于 2019-12-11 07:49:28
问题 I switched my application to https. I added system.webServer rewrite rule <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" /> </rule> in my web.config It rewrites http://mydomain.com to https://mydomain.com which is good. Bot how to make it to rewrite also http://www.mydomain.com to https://mydomain.com

Change Query String Value in IIS URL Rewrite Rule

旧巷老猫 提交于 2019-12-11 07:35:08
问题 I have tried multiple combinations so far but no luck. I have a URL like below. https://teams.company.com/Search/pages/results.aspx?url=https://teams2017.company.com/sites/hrdepartment I want to create a rule that will change the query string value from teams2017 to teams only, like below. https://teams.company.com/Search/pages/results.aspx?url=https://teams.company.com/sites/hrdepartment I am using IIS 8.5 with IIS Rewrite rule installed. 回答1: You rule should be like that: <rule name=

HAProxy - URL redirection & rewriting

落花浮王杯 提交于 2019-12-11 07:26:40
问题 I am completely new to haproxy setup. I want to setup haproxy on top of tomcat servers. The below configuration works well for tomcat applications. global log 127.0.0.1 local0 log 127.0.0.1 local1 notice maxconn 4096 user haproxy group haproxy defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 20000 contimeout 5000 clitimeout 50000 srvtimeout 50000 listen webfarm 100.100.100.100:80 mode http stats enable stats uri /haproxy?statis stats realm

htaccess rewrite URL to append Google campaign tracking causing redirect loop

拈花ヽ惹草 提交于 2019-12-11 07:16:25
问题 We are attempting to track offline campaigns to using aliased URLs that point to our main site. We need to append Google analytics campaign tracking code to the end of the URL when the domain is one of the aliased domains. The following redirect appends the correct information but causes a redirect loop, which I would assume because the RewriteCond still matches as true after the RewriteRule is applied. RewriteCond %{HTTP_HOST} ^bikerhelp911\.com$ RewriteRule (.*) http://bikerhelp911.com/?utm