Skip to main content

Questions tagged [rewrite]

URL Rewriting maps an incoming URL to a modified URL, so that the request is processed as if the original request was made to the modified URL. This is often used to provide more search engine friendly URLs.

0 votes
0 answers
34 views

Apache: rewrite URI path to (canonical) mixed case version and load actual content via an Alias?

We need to do some URI mangling for some web content that (for historical reasons) has been promoted using mixed case URIs. The address is www.domain.invalid/ACRONYM/pROJECT (with various pages ...
dave559's user avatar
  • 451
0 votes
1 answer
55 views

Apache: How do I redirect all userdir user web spaces to a different server?

We want to move our user web spaces (eg, www.domain.invalid/~usersite) to a different server (webhomes.domain.invalid/~usersite), but we want to ensure that existing incoming links and bookmarks get ...
dave559's user avatar
  • 451
0 votes
0 answers
60 views

Help needed with .htaccess

I have a website which needs to be changed from Nginx to Apache webserver. The index directory is nl.html but the HTML extension is removed from the address bar. If I visit the website example.com it ...
Noob's user avatar
  • 161
0 votes
1 answer
989 views

Apache 2.4: Restrict access to reverse proxy by IP range, and redirect requests from all other hosts

We have a front-end proxy server that serves pages from a back-end website (both running Apache 2.4): # Apache config snippet from frontend server SSLProxyEngine on ProxyPass "/blah" "...
dave559's user avatar
  • 451
0 votes
0 answers
778 views

configure redirect rules in a apache reverse proxy

I have a apache reverse proxy setting where I have to redirect all requests from abc.com to abc-test.com, the backend for this proxy is a AWS ALB. I have the below config which is not working: ...
Karthik K's user avatar
  • 421
0 votes
1 answer
223 views

Path rewriting/aliasing upon SSH connection

I've migrated my git repositories from Gitlab to Gogs and I've taken the opportunity to change some organization/group names and reorganize repositories. I'd like to maintain the current Git+SSH URLs ...
lgeorget's user avatar
  • 14.4k
0 votes
1 answer
709 views

HTTPD Redirect Rule as Proxy is giving me file not found error. How do I proxy to an external url?

I have a reverse proxy to AWS Elasticsearch. I am having issues with using RedirectRule: no matter what I try, my URL is being interpreted as a file. SSLProxyEngine On ProxyRequests On ...
gerbdla's user avatar
  • 11
1 vote
2 answers
496 views

URL rewriting for root of website

This is the configuration of my Apache 2.4.37 webserver on Centos 8. File /etc/httpd/conf.d/mysite.conf: <VirtualHost *:80> ServerName mysite.com DocumentRoot "/var/www/html" ...
dr_'s user avatar
  • 32.3k
0 votes
1 answer
588 views

Apache RewriteCond not matching on `REQUEST_FILENAME` even though file exists?

Trace log: apache_1 | [Wed Nov 20 17:14:43.950796 2019] [rewrite:trace2] [pid 9:tid 140252198749952] mod_rewrite.c(483): [client 172.18.0.1:54078] 172.18.0.1 - - [localhost/sid#7f8f031725e8][rid#...
Chris Stryczynski's user avatar
0 votes
1 answer
725 views

Apache RewriteMap with wildcard

We want to migrate multiple domains on new servers. In the first step (though from a SEO point of this is not recommendable) everything has to be redirected to the new domain's root. Later the team ...
Sascha's user avatar
  • 245
-1 votes
1 answer
8k views

NGINX rewrite rules not working

I am playing with NGINX rewrite rules, but no matter what I do, things wont work. The current link: /tutorials/index.php?article=2 How I want it /tutorials/2 My - current - NGINX rewrite conf/rule: ...
blade19899's user avatar
1 vote
0 answers
259 views

Correct configuration of nginx for rewrite and access control

Here is my current nginx config server_name web.com; server_tokens off; root /usr/share/nginx/html/web; index index.php; if ( $request_uri ~ "/index.(php|html?)" ) { rewrite ^ /$1 permanent; } ...
Sonya Seyrios's user avatar
0 votes
2 answers
898 views

An optimal way of nginx rewrite rule building for pretty URL

The webpages are accecced in the following manner: example.com/?site=website In this example, I'm accessing the website located on example.com domain. Could anyone suggest an optimal way of ...
Tarlan Mammadzada's user avatar
0 votes
1 answer
806 views

Rewrite rule nginx, token

I have a java application which is behind nginx proxy pass. When the URL is called the application automatically creates a path for the served content. So when you call https://somedomain.com you get ...
DaWe4444's user avatar
  • 123
1 vote
1 answer
859 views

Replace single quotes for strings divided by blank space from variable

I'm writing a bash script where I'm reading in a variable via read this two strings: log.*.console.log log.*.log They are separated by space. How can I rewrite the strings that the output from the ...
DaWe4444's user avatar
  • 123

15 30 50 per page