url-rewriting

URL Rewrite on a WordPress Page Query String

非 Y 不嫁゛ 提交于 2021-02-07 09:30:00
问题 I have a WordPress site with a custom page comparison that gets a string. Now it takes: mysite.com/phones/compare/?between=samsung-galaxy-note-3-vs-nokia-lumia-730 It needs to be like that: mysite.com/phones/compare/samsung-galaxy-note-3-vs-nokia-lumia-730 I've tried adding code on my site's .htaccess that didn't worked for me and went to WordPress 404 page: RewriteRule ^phones/compare/(.+?)/?$ phones/compare/?between=$1 [NC,L] Also I need to redirect to the new search engine friendly URL too

URL Rewrite on a WordPress Page Query String

耗尽温柔 提交于 2021-02-07 09:29:01
问题 I have a WordPress site with a custom page comparison that gets a string. Now it takes: mysite.com/phones/compare/?between=samsung-galaxy-note-3-vs-nokia-lumia-730 It needs to be like that: mysite.com/phones/compare/samsung-galaxy-note-3-vs-nokia-lumia-730 I've tried adding code on my site's .htaccess that didn't worked for me and went to WordPress 404 page: RewriteRule ^phones/compare/(.+?)/?$ phones/compare/?between=$1 [NC,L] Also I need to redirect to the new search engine friendly URL too

Nginx reverse proxy subdirectory rewrites for sourcegraph

ε祈祈猫儿з 提交于 2021-02-07 07:16:48
问题 I'm trying to have a self hosted sourcegraph server being served on a subdirectory of my domain using a reverse proxy to add an SSL cert. The target is to have http://example.org/source serve the sourcegraph server My rewrites and reverse proxy look like this: location /source { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Scheme $scheme; rewrite ^/source/?(.*) /$1 break; proxy_pass http:/

Pretty URL for .html with parameters

北战南征 提交于 2021-02-05 07:10:29
问题 I have a website which consists only from .html frontend and I want to have pretty URLs. My goal is to create something like this http://test.com/mypage.html => http://test.com/mypage http://test.com/mypage1.html => http://test.com/mypage1 and for one specific page http://test.com/my-prettlink.html?id=1 => http://test.com/my-prettlink/1 I tried this .htaccess which is located in project root but only removing .html works. Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine

Why am I getting a 404 error when trying to reach the taxonomy.php page without any terms, (Wordpress don't see taxonomy page)

一曲冷凌霜 提交于 2021-02-05 07:09:23
问题 I'm trying to create taxonomy page so I created taxonomy with taxonomie taxonomy-nowe.php but my WP don't see the page or I mess something with the rewrite URL? Can someone check my code and see if something I'm doing wrong. I did the flush the permalinks by save the Plain and then return to Post name permalinks. But I get not result. I want to achive somethink like this: domain.pl/oferta/kopiarki/nowe // custom post type function td_devices_posttype() { $labels = array( 'name' => _x(

Why am I getting a 404 error when trying to reach the taxonomy.php page without any terms, (Wordpress don't see taxonomy page)

倖福魔咒の 提交于 2021-02-05 07:07:16
问题 I'm trying to create taxonomy page so I created taxonomy with taxonomie taxonomy-nowe.php but my WP don't see the page or I mess something with the rewrite URL? Can someone check my code and see if something I'm doing wrong. I did the flush the permalinks by save the Plain and then return to Post name permalinks. But I get not result. I want to achive somethink like this: domain.pl/oferta/kopiarki/nowe // custom post type function td_devices_posttype() { $labels = array( 'name' => _x(

UrlRewrite condition based on custom HTTP header

谁说我不能喝 提交于 2021-02-04 22:15:27
问题 I'm trying to configure a rule in UrlRewrite that has 2 conditions: HTTP header HTTP_HOST needs to match a certain domain (api.contoso.com) A custom HTTP header x-app-version needs to be present in the HTTP request based on this info, I'd like to redirect to a different version of the API in the back-end. Problem The rule is behaving as expected on the first condition. It kicks in when HTTP_HOST matches api.contoso.com. However, it ignores my custom x-app-version header. Assumption So, I fear

Nginx geoip redirect , but exclude URL

霸气de小男生 提交于 2021-01-29 11:10:04
问题 Currently, I have the following setup for GeoIP redirect in Nginx: set $fromAU 0; set $isAUuri 0; set $isUSuri 0; if ( $geoip_country_code = "AU" ) { set $fromAU 1; } if ( $request_uri ~* "^/australia" ) { set $isAUuri 1; } if ( $request_uri ~* "^/usa-can" ) { set $isUSuri 1; } if ( $request_uri ~* ^/(wp-admin|wp-login\.php) ) { set $isUSuri 1; } set $redirectableAU "${fromAU}${isAUuri}"; if ( $redirectableAU = "10" ) { rewrite "^(/australia)?(.*)" $scheme://$host/australia permanent; } if (

How do I redirect a specific port in the IIS server to an other port

喜你入骨 提交于 2021-01-29 10:00:34
问题 My URL Rewrite rule only works for port 80 in IIS . The rewrite works for : http://localhost:80 --> http://localhost:8100 The rewrite works for : http://localhost:80/redirect --> http://localhost:8100 The rewrite doesnt work for : http://localhost:8080 --> http://localhost:8100 The rewrite doesnt work for : http://localhost:8080/redirect --> http://localhost:8100 My web.config is following: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <directoryBrowse enabled=

URL Rewrite invalid certificate

陌路散爱 提交于 2021-01-29 08:55:54
问题 So, we are running on IIS 10.0 and have multiple domains registered at our ISP which all point to the public IP of our webserver. The webserver has only one certificate assigned to a wildcard subdomain. So #.rootdomain.nl I've setup a URL rewrite to rewrite all the different domains to our root domain: https://www.rootdomain.nl however the problem I'm experiencing is that the first redirect goes alright but the second doesn't gets redirect instead the browser says there no valid certificate