All Questions
Tagged with http-status-code-301 url-rewriting
114
questions
0
votes
0
answers
16
views
Redirect of entire site not working for sub-folders
I have implemented this change to .htaccess.
RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?stakeholdermap\.com$ [NC] RewriteRule ^(.*)$ https://www.stakeholder-map.com/$1 [L,R=301]
...
0
votes
0
answers
18
views
redirect 301 every page that contains the same paramenter
Mod_rewrite - remove question mark with paramenter and redirect 301 in .htaccess
Is it possible to remove the ?number= parameter that each of my pages contains and redirect 301 without this parameter?
...
0
votes
0
answers
14
views
Combined 301 Redirect www, https and subdomain
I have the htaccess lines below to redirect requests without www and https to https://www.domainname.com.
RewriteCond %{HTTP_HOST} !^www\. [OR]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://www....
0
votes
0
answers
692
views
Next.js simple rewrite not working when trying to rewrite from /robots.txt
I am trying to create a dynamic robots.txt file in my next.js app. The api route solution suggested by @juliomalves works well:
Generating a dynamic /robots.txt file in a Next.js app
Until the rewrite,...
1
vote
1
answer
183
views
Config Haproxy front-end to redirect client requests from Host/A/* to Host/B/* when request equals Host/A/*
I run a web server (RHEL7) that uses haproxy v1.5 as the front-end for remote client requests and host a farm of web-applications each running in specific directories off the web-doc root (i.e. /...
0
votes
1
answer
264
views
How to redirect (htaccess) all URLs from within a directory?
I have this current scenario
Redirect 301 /linux-distros/link-a/ https://www.example.com/
Redirect 301 /linux-distros/link-b/ https://www.example.com/
Redirect 301 /linux-distros/link-c/ https://www....
0
votes
1
answer
683
views
Redirect not working on iphone/mobile data
I am trying to redirect to https and then a subfolder.
It works great on my iPhone until I connect to mobile data and clear my browser/cookies. Then I get a connection time out or server stopped ...
1
vote
2
answers
63
views
301 Redirect with .htaccess to a new domain with editing some specific links
I am trying to move my whole website through .htaccess doing this
#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ https://newdomain/$1 [R=301,L]
Some of the links from the old website ...
1
vote
1
answer
67
views
how to write 301 redirect rule when urls have the same base
I have troubles writing 301 redirect rules in ht access. I can't find the right syntax.
My problem is that two rules
Redirect 301 /lessons/ https://example.com/lessons/piano/
Redirect ...
1
vote
1
answer
297
views
Redirect non www to www sub pages also
in .htaccess Am using :
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1/$1/ [R=301,L]
It works fine for main domain i.e. redirects example.com to ...
1
vote
1
answer
62
views
Trying to obtain images from another location but RedirectMatch in htaccess is ignored
I've just setup a new subdomain 'preview', ie preview.example.com and I am setting up a replicate of the codebase of a live website (from the www. subdomain) so that I can have a duplicate environment ...
3
votes
1
answer
128
views
Avoid .htaccess inheritance
I have an .htaccess in root directory to redirect to a subdomain.
RewriteEngine on
RewriteCond %{HTTP:Accept-Language} (en) [NC]
RewriteRule .* https://en.domain.com [R,L]
In the same directory I ...
2
votes
2
answers
449
views
How to redirect domain path to other domain path using .htaccess?
The domains below are just sample domaains.
I want to redirect mydomain.com/test/ (wildcard) to google.com/dl (wildcard)
I am using this codes
RewriteEngine on
RedirectMatch 301 ^/test/.*$ https://...
0
votes
1
answer
242
views
Redirect path to home, with path string as a GET variable using .htaccess
I am trying dynamically to redirect all links of the form
example.com/path1
example.com/path2
example.com/path3
...
to
example.com?src=path1
example.com?src=path2
example.com?src=path3
...
A static ...
1
vote
1
answer
93
views
Redirect 301 with regular expressions to new url with different numeration
I moved my system forum and I need some redirections. Is difficult for me redirect this urls.
website.com/folder1/123456-name-of-article
website.com/folder1/name-of-article-r654321
You can view this ...