All Questions
208
questions
0
votes
0
answers
9
views
HaProxy custom ports
I need to load balancing one of our customers application portal. The flow works as follow:
The enduser reach the portal through the URL example.net:3000/login page;
The enduser will choose one of ...
1
vote
1
answer
69
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
0
answers
36
views
Mask Url from path to subdomain using NGINX
I want to achieve url rewrite as such:
https://documentation.domain.com/login to https://app.domain.com/login
https://api.domain.com/login to https://app.domain.com/login
, any sudomain with url {...
0
votes
0
answers
96
views
NGINX Rewrite path to subdomain with cloudflare results in Too many redirects
I want to achieve url rewrite as such:
https://documentation.domain.com/login to https://app.domain.com/login
https://api.domain.com/login to https://app.domain.com/login
, any sudomain with url {...
0
votes
1
answer
49
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 ...
1
vote
1
answer
285
views
Nginx how to make redirect by removing part of URL with regex mask?
I need to redirect from URL like
example.com/some-urltext-nav.html to example.com/some-urltext.html (remove "-nav" only).
I've tried some regular expressions in server block like rewrite ^.*?...
0
votes
0
answers
361
views
How to remove part of an URL in Nginx?
I want to automatically remove /feed from the URL
For Example:
example.com/blog/something/feed/
to
example.com/blog/something/
Could someone tell me how to do this in Nginx?
0
votes
1
answer
660
views
nginx redirect multiple server names with non-standard port in url
I have an endpoint like https://app1.company.com:5555 and will like to be able to browse the website with the port number in the url for all pages and also be able to browse without the port number at ...
0
votes
0
answers
329
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....
1
vote
0
answers
115
views
when it goes to https:/... directly it is missing the referer part
it's all about cookies ,it suppose redirect to ?referer_id=186 every time which is refresh the cookies of new logo but i notices when user delete or clear the history of Brower and try to visit the ...
1
vote
1
answer
2k
views
rewrite rules from apache to nginx
I have a problem with this... I'm using free hosting for giving a demo to my future buyers of my own cms.
The hosting is hubuhost.com, they are supporting the last version of php 8.1. The problem is ...
0
votes
1
answer
3k
views
Redirect causes 404 error on nginx
How do I redirect if a user tries to direct access image files in browser only? I want to still keep the ability to allow social media sites to embed our images by hotlinking. I just want only if a ...
0
votes
0
answers
647
views
Bad nginx URI redirection
I am trying to authenticate in a keycloak server however the redirect_uri doesnt come with the context (/admin/).
Nginx is producing a wrong URI redirect_uri: hxxps://***.pt/auth/realms/example/...
0
votes
1
answer
746
views
How to redirect user if direct access image files by browser? [nginx]
How do I redirect if a user tries to direct access image files in browser only? I want to keep the ability to embed images with <img src="...">. How to redirect from
https://img....
1
vote
0
answers
274
views
HAPROXY - redirect URL and keep the same URI
Im using haproxy to do redirections. Basically I have a URL ( https://google.com// ) and I want to keep the same URI and just redirect only the base url ( https://test.com//). For HAPROXY it has to be ...
1
vote
1
answer
814
views
Two different rewrite conditions in the same .htaccess?
I need to create a rewrite condition for two specific files, according to the requested path in the URL. It's possible?
Condition 1: If the URL is example.com/admin go to admin.php?uri=params. That is:...
-1
votes
1
answer
171
views
How to direct a custom domain at a particular tweet [closed]
I have registered a new domain, let's call it particulartweet.com.
I would like users who enter that domain in their browser to land on a particular Twitter URL, like https://twitter.com/wgervais/...
0
votes
0
answers
137
views
Nginx prevent hotlinking and redirect not work with new Nginx version
In the past, this works perfectly:
#domain1.com
location /files/ {
valid_referers none blocked domain1.com domain2.com domain3.com;
if ($invalid_referer) {
return 403;
}
if (!-...
1
vote
1
answer
2k
views
Rewrite Rule for URL with query does not work
I write the following rewrite rule:
<IfModule mod_rewrite.c>
RewriteCond %{QUERY_STRING} rp=\/knowledgebase\/.*
RewriteRule ^\/customer\/index.php /knowledgebase/ [R=301,L]
RewriteRule ^\/...
1
vote
0
answers
599
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 ...
0
votes
1
answer
2k
views
Nginx rewrite urls within a single page app
I've been having issues with this nginx configuration, and after scouring this site, I'm wondering if it's even possible.
I have a very simple single page app with the following routing:
server {
...
0
votes
0
answers
851
views
NGINX - subdomain using https to another internal IP:PORT and hide new path
I have spent more than week looking around this site to solve the following two items.
Background: subdomains are setup in GoDaddy DNS to forward to our public IP.
Internally DNS has forward and ...
0
votes
2
answers
174
views
Need assistance to rewrite url in Nginx for WHMPRESS
I need to rewrite URLs in NGINX. I tried many examples from google searches but failed.
/manager/?whmpca=order_process&a=add&pid=5&a=add¤cy=1&billingcycle=monthly
I need to ...
2
votes
3
answers
7k
views
Nginx: Rewrite while preserving the path
I want to set up a temporary redirect to another domain but I want to keep the path very similar.
Here's an example:
Request URL: https://api.mydomain.com/uploads/default/logo.png
Rewritten URL should ...
1
vote
1
answer
119
views
Redirect the document root and a specific page only to another domain
Might sound confusing, but what I want to achieve is this:
If the user visits:
www.mydomain.com (with or without www.)
transfer them to:
www.myotherdomain.com/welcome-old-users
At the same time, I ...
0
votes
1
answer
797
views
Apache redirect URL to another virtualhost
I have two sites which runs independently on my VPS, let's call them site1 and site2.
They are respectively located at /var/www/html/site1 and /var/www/html/site2
I don't have a domain name yet but I ...
0
votes
1
answer
2k
views
Nginx location redirect to destination URL obtained from a different server
In my current scenario there are a dozen domains with a PHP redirect script set up on them that obtains the destination URL from a SQL database based on the $_SERVER['QUERY_STRING'] parameter passed ...
0
votes
0
answers
77
views
How to execute php file on calls to CSV?
I'm trying to find out how to generate CSV file with php on nginx when CSV called for download. E.g. when facebook calls www.site.com/feeds/feed1.csv server should execute www.site.com/feeds/feed1.php ...
0
votes
0
answers
14
views
Redirect Url on Apache Server
i have this url:
https://pouv.com/presentation/vues/restreint/gestionnaire/****
i want to redirect to:
https://pouv.com/bo/
I do this on my .conf:
## Rewrite rules
RewriteEngine On
RewriteRule ...
1
vote
0
answers
36
views
Combine rewriting and redirection rules in Apache
I have VirtualHost configurations in Apache which used to use the RewriteEngine to do some URL corrections and finally pass control to one (or more, using mod_proxy_balancer) Zope/Plone instances.
Now,...
0
votes
1
answer
25
views
How to fix redirection for query?
I have old and new URL paths, I want to write redirection rules, so 2 versions of old paths with query strings:
/cgi-bin/something?123
/cgi-bin/something?keywords=123&offset=120
are both ...
0
votes
1
answer
1k
views
HAProxy URL redirection
I have a goal to redirect some URLs into one.
I mean this is the destination url: https://application.company.com
I want to redirect:
http://company.com
https://company.com
https://application.company....
1
vote
1
answer
5k
views
Nginx rewrite or redirect for subfolder
I have a Debian 10 server with NGINX. And it is servering several domains. Let me explain the situation:
I have setup my HTTP redirects permanently to HTTPS, in a file called redirect.conf. It is ...
1
vote
1
answer
4k
views
nginx - how to redirect depending on a range of IP addresses?
I am trying to make a site only accessible from within the local network and people from the external network will get a static page saying some other message.
This is what I am trying to do but it ...
-1
votes
3
answers
7k
views
How can i do a redirect with 404 as status code in Nginx [closed]
We have moved our website to a new domain and our SEO department want to have some redirect from the old urls to the new urls with 404 status code. I dont know if it is possible and want to collect ...
0
votes
1
answer
347
views
Stop redirect IP to Domain of a folder
Everytime I try to access to http://server-ip/folder1 it redirects me to http://example.com
I want to access to folder1 but it´s impossible because it's redirected to http://example.com/folder1
...
1
vote
1
answer
828
views
regex rewrite in nginx to match year in the URL
I am trying to write an nginx rewrite directive that redirects a URL like https://website.com/2018/11/20/dummytext/feed/ to https://website.com/2018/11/20/dummytext/ (removing the /feed/ in the end).
...
0
votes
1
answer
81
views
How to append url using rewrite?
When user visited my website www.abc.com, I would like to make it to be www.abc.com\xx\yy\zz.html. However if user visited anything other than www.abc.com, the url should remain the same.
Expected:
...
0
votes
1
answer
2k
views
htaccess - .htaccess in sub directory not inheriting .htaccess in root directory
i have 2 .htaccess files
first in /public_html/
#ErrorDocument 404 https://example.com/en/404.php
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://example.com/$1 [R,L]
...
1
vote
1
answer
620
views
htaccess rewrite country without subdomains
i need to rewrite URL from
us.example.com
to
example.com?country=us
without subdomains
I tried these 2 rules:
1.
RewriteRule (US|EG) ?c=$1 [NC , L]
2.
RewriteRule :\/\/(.*?).example.com ?C=$...
0
votes
1
answer
2k
views
IIS 7 URL Rewrite Only If No File Nor Subdirectory Nor Query String
(I posted this question on StackOverflow because searches for an answer showed related questions on StackOverflow, which got answers and many upvotes. But my question so far earned a downvote and an "...
0
votes
1
answer
332
views
Nginx redirect to subdomain without changing the url
I want to redirect www.example.com and example.com
to ww.example.com in nginx
I tried a few things but ended up with a redirect loop
like
return 302 $scheme://ww.example.com
0
votes
0
answers
573
views
nginx: Redirects URL's to extensionless pages not working on home page
I'm trying to automatically redirect pages with a PHP extension to a non extension page version e.g example.com/page.php to example.com/page. I've managed to get this working for all pages except my ...
3
votes
0
answers
115
views
Need to rewrite domain with specific criteria on Nginx
I have a server with multiple domains pointing to it (it has Wordpress Multisite running on it).
One of those domains (e.g., mydomain.xxx) I need to redirect to another domain, which is on a ...
2
votes
1
answer
3k
views
Same server, different Apache virtual hosts, redirection does not work for one of them
On my server there are multiple virtual hosts configured. Two of them should have the following behaviour, so that in the end, it should always be redirected to https://www.....
for example, I put ...
2
votes
1
answer
102
views
How to redirect/rewrite a domain-1/dir1/dir2/* to another domain-2/dir1/dir2/* in htaccess?
I'm trying to redirect all URLS from one directory in one domain to the same directory to another domain on the same server, and could not make it work. How do I solve this problem?
I have tried:
...
1
vote
1
answer
5k
views
Redirect URL in IIS to different domain and remove portions of the URL
We currently have URLs like:
https://tfs.mydomain.com/tfs/MyProjectCollection/Project/_workitems
that I need redirected to:
https://dev.azure.com/MyOrg/Project/_workitems
Using the HTTP Redirect ...
1
vote
1
answer
138
views
Are .htaccess redirects secure/reliable (website maintenance)?
Our website will be going down for around an hour or so for maintenance. All users need to be redirected to a page indicating that the website is receiving an update and/or under maintenance.
Will ...
1
vote
1
answer
657
views
How to debug big redirect chain in nginx. Unexpected redirect
I have a task to make a large site migration now. And i have a large number of redirects in config.
But I cannot understand why one redirect causing second redirect in chain. Even if any other ...
1
vote
1
answer
3k
views
Nginx Redirect to request_uri
I want to achieve with Nginx return or rewrite option to redirect user request based on request_uri.
For example, if user request page mysite.com/test.com then he should be redirected to test.com.It ...