Tag Info

New answers tagged

0

I went to regex101.com to test and this regex ^(.*)\/(.*)(_)[0,1](.*)\.(.+)$ matched for string /static/images/00f37ac6291bb6e8_150.jpeg. With this match $1/$2.$5 would be the path to the larger image.


1

I've discovered that you cannot have a variable in the RewriteCond regex, because it seems it is only compiled once, but not per-request. You could workaround this by putting both ${lookup} and %{REQUEST_URI} in a test string using a separator (let's say a comma) and then make sure they are equal, e.g : RewriteCond %{REQUEST_URI},/${lookup:/$1/}/$2 ...


0

TLDR: No. You can't. It isn't MTA job. Set the configuration in MUA instead. Some explanation and example case: Suppose your costumer alice@external.example.com send email to support@example.net. Here is the full email looks like From: alice@external.example.com To: support@example.net Subject: plz help My internet is too slow, Plz halp Because of ...


0

Proxy Pass might be what you are looking for. It will use the url that they connected to, and act as a proxy to the new url. They will still see the old url. ProxyVia on ProxyRequests Off ProxyPreserveHost Off ProxyPass /test http://newdomain/test ProxyPassReverse /test http://newdomain/test


0

RewriteEngine On RewriteBase / RewriteRule ^test/(.*)$ http://newdomain/$1 [P,L] the above rule will redirect all /test/... to backend without modifying the browser URL


1

You are using the rewrite directive wrong. You don't use if with the rewrite rules. You should write your current rules like this: rewrite ^/gps$ /gps.lf.ws.vh.sprite.php break; rewrite ^/setup$ /admin.php break; rewrite ^/error$ /gttindex.php?WARNING=wrongcredentials break; And most likely you should use last instead of break in the rules. Regarding ...


0

I finally found an answer on stackoverflow here. Thanks for the help with this.


0

You Can try something like below. RewriteCond %{HTTP_HOST} ^(.*).domain1.com RewriteRule ^(.*)$ http://%1.domain2.com/$1 [R=301,L] Let me know if that helps


1

This works for me: server { listen 80; server_name www.yourdomain.com yourdomain.com; return 301 https://yourdomain.com$request_uri; } server { listen 443 ssl; server_name www.yourdomain.com; ssl_certificate /path/to/certificate.crt; ssl_certificate_key ...


0

You can accomplish this in several ways using IIS Rewrite Module you can create redirects only for handful of the links you need You can use regex/pattern matching to redirect a similar set of links Here is a visual guide on how to use IIS Rewrite Module


0

http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite Using Wordpress on IIS through an Azure Virtual Machine Requires the following code for permalink urls like example.com/about Add to Web.Config <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule ...


4

In case you use nginx as a load-balancer, the stream will be : Redirect : Step 1 : Client => LB (HTTP request) Step 2 : LB => Client (HTTP reply) Step 3 : Client => Backend (HTTP request) Step 4 : Backend => Client (HTTP reply) Proxy : Step 1 : Client => LB (HTTP request) Step 2 : LB => Backend (HTTP request) ...


0

I'm using stacey cms, here's what I'm using for nginx config in place of apache: server { listen 80; server_name localhost; root /home/vagrant/test; index index.php index.html index.htm; error_page 404 /404.html; location / { if ($query_string != "") { return 301 $scheme://$http_host$query_string; } ...


0

You need specific software to perform this, and it is considered Evil. Breaking the Internet by performing a man-in-the-middle attack on DNS traffic is exactly why things like DNSSec are being rolled out. If you're intent on looking though, you might want to check results for "DNS Interception" and "Transparent DNS Proxy". Some things that come to mind are ...


0

Are you creating the redirect rules in the GUI, or by editing web.config directly? It might be that your web.config has an error in it somewhere. Try turning custom errors off so you can see the detailed error message, it should help you track the problem down. Find this line in your web.config and uncomment it; <customErrors mode="off"/> If you're ...


0

I'm not sure about your error, but since no one else has tried an answer, and you have a problem to solve, I'll suggest a different way to accomplish your goal. Leave your main app only answering at the name you want people to use. Add a second web app that answers to the 3 names you want redirected. Configure this site to forward traffic to the main ...


1

Please look at the location block. You are matching a / and then inside the block too, you are matching a /. If you need to eliminate /, you need to ignore it somewhere. Probably, you are looking for the following solution... location / { rewrite ^/?(.*) https://example.com/ar$1 permanent; }.


0

Biggest problem with your idea is that if you expect the reverse proxy to send cookies to the backend, but the client wouldn't send cookies to the frontend (unless the backend cookie domain was inferior to the frontend). I would suggest that mod_proxy would likely be too difficult to use, and in this case you'd get to your goal faster with mod_rewrite. ... ...


0

I'm not sure what behavior do you want, I see no mention of index.php in your request, but it is in your configuration. Anyway this rewrites any URL from the form hostname/XX to hostname/i.php?c=XX RewriteEngine On RewriteRule ^/([a-zA-Z]{2})$ /i.php?c=$1 [R=301,NC,L] For the opposite translation: RewriteCond %{QUERY_STRING} ^c=([a-zA-Z]{2})$ ...



Top 50 recent answers are included