Questions tagged [301-redirect]
The HTTP response status code 301 Moved Permanently is used for permanent redirection. This status code should be used with the location header.
538
questions
-1
votes
0
answers
8
views
how to set up captive portal pop up [closed]
I have simple router witch don't have captive portal functionality, I have created virtual server in my router as 192.168.0.100:80, this ip is of my pc that runs apache server, i can able to open site ...
0
votes
0
answers
35
views
return 301 with nginx 1.24 is not working
I am trying to redirect http://foo.example.com to https://example.com:1234 [not really the port I am using ;-) ]
This used to work perfectly on an nginx 1.25 installation, but is not working on 1.24 ...
0
votes
0
answers
27
views
Using environment variables and a redirect loop to force-clear a 301 redirect
We mistakenly used a 301 redirect on a very important page, and now that we want to actually use the page, many users' browsers have the 301 stuck in their cache. The problem is that the destination ...
0
votes
1
answer
37
views
how to redirect entire my website in multilingual html website
i have a multilingual website, Arabic and English, my English pages its in rood directory and Arabic pages its in folder name ar; but i got my auditing report that; Search engines see
www....
0
votes
1
answer
42
views
how to proper redirect permanently in lighttpd
The following config (/etc/lighttpd/lighttpd.conf) seems to redirect to the default page
$HTTP["host"] == "pool.ntp.org|ch.pool.ntp.org" {
accesslog.filename = "/var/log/...
0
votes
0
answers
18
views
Htaccess Redirect Rule for 0-9 .html and Query String
I am new here and writing my question. Seeking help to resolve a redirection issue.
I want to redirect the following similar URL structure to the given example;
URL: https://example.com/jobs/...
0
votes
2
answers
349
views
Is it better to redirect root to www or www to root?
This may be a 'fashion' question, but is it better to redirect:
https://www.example.com -> https://example.com
or
https://example.com -> https://www.example.com?
I always assumed it was better ...
0
votes
0
answers
54
views
subdomain redirect best practices
I'm setting up a site served by Nginx on FreeBSD. The only content is at sub.example.net, and I'd like to 301 any requests to example.net, www.example.net, and www.sub.example.net.
My current solution ...
0
votes
1
answer
49
views
NGINX domain conf file, how to redirect 301 and proxy_pass
I'm pretty new to nginx and I'm trying to configure a redirect from http to https and, in the same file, set as location a proxy_pass to the desired URL.
My domain.com file is this:
server {
...
0
votes
1
answer
85
views
Weird 301-redirect to http from https only happening with CF as proxy on /wp-admin on www subdomain
I have a wordpress blog on an EC2 instance on AWS using the AMI image aws-marketplace/bitnami-wordpress-6.3.2-6-r09-linux-debian-11-x86_64-hvm-ebs-nami-7d426cb7-9522-4dd7-a56b-55dd8cc1c8d0
In ...
-2
votes
2
answers
41
views
301 redirect the old domain with a certain link to a new domain with the same link
I have a problem, I want to redirect htaccess
The content of domainold.com is still used, only this URL has changed
from the Old website, namely http://domainold.com/product/register
to my new site, ...
0
votes
1
answer
81
views
nginx redirects with changed response code
I am trying to redirect any location that gives 404 to the front page and change the response code to 302.
According to nginx documentation this should be possible?
https://nginx.org/en/docs/http/...
1
vote
1
answer
40
views
Redirect removing sufixes after 3 URL segmentes in Nginx
This is the URL that I need to remove the last segment (?order=asc)
https://www.example.com/segment_1/segment_2/page/the_number_goes_here/?order?asc
This is the code I'm trying:
location ~ ^/([^/]+)/(...
1
vote
1
answer
143
views
How to remove amp word from center of url
I removed Amp Module from our site and I need to remove amp word from center of all of urls.
Using Nginx Web server
for example :
mysite.com/shirt/nike?amp=1&product_list_dir=asc&...
0
votes
1
answer
662
views
NGINX redirect returns 414 Request-URI Too Large
I'm not an NGINX's expert, I'm trying to redirect an entire website from a domain to another domain.
To test the solution in local I'm using two different urls:
fake old domain -> 127.0.0.3
fake ...
1
vote
1
answer
60
views
how to write 301 redirect by checking an special character from the url using htaccess?
I have few urls contain some special characters like below
www.abc.com/archive/category/コレクション-帯-袋帯
www.abc.com/archive/category/お役立ち情報
I want to write .htaccess to handle this redirection.
I tried ...
0
votes
1
answer
72
views
Is it possible to set up .htaccess rule for incoming traffic from 301 redirect?
We have a permanent 301 redirect that is set up for an old site that is now being redirected to a page on a new site. Is it even possible to set up an .htaccess rule on our new sites Apache server to ...
1
vote
1
answer
199
views
Redirecting specific subdomain with NGINX to point to a different website while using SSL
I have the following NGINX configuration:
# HTTP Redirect
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
# ...
0
votes
1
answer
123
views
Redirecting subdomain to another domain
I have a subdomain, sub.domain1.com. I want to redirect this to domain2.com.
The result is a security exception because the certificate on domain2.com doesn't include sub.domain1.com.
How does one ...
0
votes
1
answer
455
views
How can I configure Nginx to redirect all traffic to my website to the HTTPS WWW version and HTTPS version for subs with a consistent URL structure
What I am trying to do is to have some clean redirects and don't make the content from the server available everywhere like is available via https://server-ip https://non-www and https://www-version
I ...
0
votes
0
answers
106
views
Site with subdomains in redirect loop - Nginx configuration Issues
this is the website (the website also have subdomains)
nginx configuration:
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to ...
0
votes
2
answers
100
views
Nginx permanent redirects from subfolder
What im trying to achieve is redirects from mysite.com/en/something/something1 to mysite.com/something/something1 is there any way to remove static subpath /en/ from the url using nginx conf?
0
votes
1
answer
55
views
Nginx custom 301 rewrite
I am struggling to find how to write this scenario 301 redirect to nginx:
https://mydomain/$
to be converted
https://mydomain/en_us/$
Actually I need to add "en_us" just after mydomain and ...
0
votes
1
answer
1k
views
How to redirect all pages that contain a specific word using the .htaccess file
I have a bunch of indexed pages that start with the same word and they are all 404 so I want to redirect them all to the homepage of the site. The server is Apache, so I would like to use the ....
1
vote
1
answer
796
views
Redirect all URLs ending in ".-detail" to remove the dot
I have a rather odd situation where our old URLs are ending in .-detail and need changing to just -detail.
For example:
example.com/product.-detail needs changing to example.com/product-detail
In ...
0
votes
1
answer
283
views
RegEx for 301 redirects to change path AND remove a string
I am looking for an RegEX redirect rule to redirect the image file locations to a new location, whilst also removing part of the original url which is the name of the image
OLD URL:
/components/...
2
votes
2
answers
3k
views
.htaccess - Redirect all URLs with one exception
I want to redirect all URLs from one domain to another.
Some of the old URLs have new counterparts with specific pages to redirect to.
All other URLs should redirect to the homepage of the new domain.
...
1
vote
1
answer
1k
views
htaccess: 301 redirect defined URLs to new domain and catch all redirect the rest
I want to redirect some URLs from an old domain to new versions on a new domain.
The old domain uses the www. subdomain and SSL.
For example:
olddomain.com/audi -> newdomain.com/cars/audi
...
1
vote
1
answer
595
views
NGINX: localhost redirecting to _
nginx version/1.18.0 (Ubuntu) — Ubuntu 22.04.01 LTS x86_64 kernel 6.0.8
I've got a server (install specs above) that has multiple host names, is running nginx, and everything is working (including ...
0
votes
1
answer
2k
views
HaProxy redirect to internal URL
I have a configuration with two backend servers I need to redirect 301 to each server with an internal URL on HTTP. It's hard to use SSL because I can't install SSL on the Report Server in that ...
1
vote
1
answer
178
views
How Can We Do 301 Redirect Of Over 200 Pages To Corresponding 200 Pages At New Location?
I need help and need it fast.
We recently migrated a subdomain to integrate with the domain.
Eg. https://blog.example.com to https://www.example.com/blog
https://blog.example.com has a ton of traffic ...
0
votes
1
answer
352
views
nginx: [warn] server name has suspicious symbols with long domain redirect
What is the best way in Nginx to redirect two Long domains URLS, I would like to configure a redirect between two domains like this:
I'm sure this has been asked before, but I can't find a solution ...
0
votes
0
answers
408
views
Issue with Nginx Url Rewrite /Redirect
For new site config I tried NGINX rewriting for the blog plan and keep the paths the same, just redirect from 'www.' to 'blog.'.
and plan for RSpace API and CME have been configured and the ALB.
www....
0
votes
2
answers
56
views
route your blog from xyz.com/blog/ to abc.com/blog/
My WordPress website domain name was abc.com (let's say) now due to a new partnership agreement the domain name is changing to WordPress xyz.com (let's say).
I tried this answer https://stackoverflow....
0
votes
3
answers
1k
views
Best way to do 301 redirects
Which is the best way to do 301 redirects (for whole domains and also for specific pages/directories)? Using Apache virtual blocks, .htaccess or other solutions?
"Best" for me probably means ...
0
votes
1
answer
946
views
Regex to remove certain patterns from urls
So i've tried this multiple times but to no avail.
Basically, what I am trying to do is check if the URL has a certain language locale and remove it and do a 301 redirect to the parent url without the ...
0
votes
1
answer
205
views
Having trouble getting a regex to redirect traffic to work correctly
I'm trying to setup some 301 redirects on WPengine using regex and I'm having trouble getting things working.
Old URL: https://www.website.com/abc/123
New URL: https://www.website.com/abc
For pages ...
0
votes
1
answer
841
views
Redirect all pages to non www and one page to www
I want to redirect all my internal pages (eg: example.com/about) to their non-www version but I want my homepage (https://example.com) to redirect to its www version (https://www.example.com).
I ...
4
votes
4
answers
11k
views
How can I redirect domain A to domain B without hosting, using only DNS records?
I want to redirect domain A (without hosting space) to domain B (301), but when I try https://domainA.com or https://www.domainA.com it ends with ERR_CONNECTION_REFUSED. Is it even possible to use ...
0
votes
2
answers
1k
views
Nginx http to https redirects download empty file instead
Im trying to redirect my Laravel+vuejs+nuxtjs project from http to https but when I enter http://example.com or http://www.example.com an empty file being downloaded instead
What have I done so far :
...
0
votes
0
answers
122
views
How to not redirect if is from social media site with Nginx?
How do I not force a redirect if it's from a social media site like reddit,facebook & twitter? Currently my setting is set to redirect any direct access to image files but I don't want to redirect ...
0
votes
1
answer
559
views
301 Redirect old domain to new and use the old domain for emails
What I want to do:
Part 1. Redirect old domain to new domain.
Part 2. Use the old domain for mails
My current setup:
Both domains are set up with Google Load Balancer and using Google managed SSL.
To ...
0
votes
1
answer
269
views
301 redirect for some pages and all other pages
I have two websites. Let's say siteA.com and siteB.com.
Now I want to add 301 redirect to siteB.com.
Some of pages of siteB.com need to be redirected to some specific pages on siteA.com
All other ...
0
votes
1
answer
179
views
https request on github.com subdomains return wrong 301 redirections to domain
First
When executing curl -iv4 https://support.github.com/contact I am receiving 301 responses with location https://github.com/contact.
Obviously when executing curl against the location returned ...
1
vote
1
answer
168
views
Redirect French homepage (and only FR home page) to English home page
Using the .htaccess file, I would like to redirect www.example.com/fr/ to www.example.com/ but not other French pages that have the /fr/ root (e.g. www.example.com/fr/page-name)
I've tried using ...
2
votes
1
answer
458
views
nginx redirect or return single location
I am trying to get videos.mydomain.com/kickboxing to redirect to a YouTube link, as well as videos.mydomain.com/classes to redirect to a different YouTube link. (These are both unlisted playlists, and ...
0
votes
1
answer
206
views
Nginx puts browser into a redirect loop when using multiple server blocks
I'm using Nginx to host a number of virtual hosts (or server blocks in Nginx nomenclature). These hosts all share the same domain with each assigned its own subdomain. One subdomain enters an endless ...
0
votes
2
answers
2k
views
Why nginx "return 301" and ”try_files“ fall into an infinite loop
my conf code:
index index.html index.php;
location / {
if ($uri = '/a/') {
return 301 https://example.com/a;
}
try_files $uri $uri/ =404;
}
If url is /a/, 301 to /a, then ...
1
vote
0
answers
682
views
Nginx rewrite and return interfere with different location block
I have the following configuration in nginx for redirecting in a certain scenario.
location /prefix-someurl {
if (condition) {
return 301 $scheme://$host/xyz.html;
}
proxy_pass ...
1
vote
1
answer
90
views
Ngnix redirect for multilevel subdirectories
I have URL like the following structure:
xyz/asset.html
abc/test.html
xyz/abc/test.html
xyz/abc/qwerty/test2.html
I would like to redirect:
xyz/asset.html to xyz/asset
xyz/abc/test.html to xyz/abc/...