Questions tagged [rewrite]

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

2112 questions
0
votes
1 answer

Howto rewrite URLs with two nginx as reverse proxies to gunicorn/Django

I have a Django application, deployed with gunicorn on port 8000, on a VM with a backend nginx, port 80, on the same VM. The nginx config is: location / { proxy_http_version 1.1; proxy_set_header X-Real-IP $remote_addr; …
user214862
0
votes
2 answers

nginx rewrite location not found

in Nginx config file, did set rewrite location like below but do not work and every time return 404 not found, what is the problem here? server { listen 80; server_name mydomain.com www.mydomain.com; root…
sIiiS
  • 111
  • 1
  • 2
  • 6
0
votes
3 answers

How to remove hypen (-) using nginx rewrite rule?

I am using this rewrite rule to redirect example.com/a-b-c?id=learn-more ----> http://example.com/abc?id=learnmore rewrite ^/a-b-c?id=learn-More http://example.com/abc?id=learnMore permanent But its not working !! It is redirecting to…
user3382916
  • 11
  • 1
  • 3
0
votes
1 answer

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; rewrite ^/Crest(.*)$ /$1; location / { …
0
votes
2 answers

Apache Rewrite URL

I had my document DocumentRoot set to www/fg. Before, I did browse to www/fg by typing http://www.mydomain.com/www/fg. Then, I set up VirtualHosts that point to www/fg. And now I just type http://www.mydomain.com. The problem is that my web…
gdm
  • 459
  • 2
  • 5
  • 19
0
votes
1 answer

How can I rewrite from /page to /xx/page, using htaccess & apache only?

Hi I have found many resources on mod-rewrite and Apache but I haven't been successful of making a working example. The example below works for ✓ WORKS example.com/en/page1.php ☞ example.com/page1.php?ln=en (internal redirect) ✓ WORKS…
0
votes
1 answer

Using nginx to access internet through intranet

I don't know if I am going about this in the right way, but here's what I need to do. I have a website that's available on the internet. But I have some users who only have access to the intranet. I want to create a proxy to allow these users to…
TKS
  • 3
  • 1
0
votes
1 answer

Nginx rewrite, from htaccess-files

I've got a PHP-project set up in this directory tree: project v1 app (project files) public index.php (controller of app) documentation php files examples php files With "project" being the root of the webserver. I want to skip the…
ANttila
  • 1
  • 1
  • 2
0
votes
0 answers

Windows 2008 IIS URL Rewrite not rewriting to index.php, Getting 404 Error instead

It is not an issue with web.config, I know this because I reinstalled IIS to fix an issue. But for completeness, here is my web.config:
brizz
  • 1
  • 1
  • 3
0
votes
1 answer

Rewrite/configure WebSVN location with MultiViews

I have configured mod_dav_svn 1.8.9 on FreeBSD along with WebSVN 2.3.3 this way: DAV svn SVNParentPath /usr/local/svn/repos SVNListParentPath On SVNPathAuthz Off Alias /repos/websvn…
Michael-O
  • 261
  • 1
  • 2
  • 13
0
votes
1 answer

URL-Rewrite to One site But not the Other

We have our own domain and have several subdomains. One of the sites needs to be accessed only via SSL, but people are allowed to type http and still arrive there. The URL-Rewrite forces the http into https. So my two subdomains are: …
bgmCoder
  • 706
  • 4
  • 16
  • 29
0
votes
0 answers

Apache rewriting sub domain URL with www prefix

My website is rewriting all subdomain links with www. for example news.example.com works fine, but if I go to news.example.com/wp-admin it will rewrite the URL to www.example.com/wp-admin This also happens if you click any links on the site,…
CMOS
  • 101
  • 4
0
votes
1 answer

redirect landing without changing url

I'm working with Apache and Joomla. I would like to have some URIs that land to the same landing page, but avoiding the URL changes. So, for…
Gerard
  • 1
  • 1
0
votes
0 answers

Rewrite rule Mod_Proxy truncate file name

I search online for the solution, but nothing :(. I write this simple rule RewriteRule ^(.*)$ http://www.mysite.com/$1 [P,NE,QSA,L] In mysite.it i have an .htaccess with this rule and it's ok, but if i have a link "http://www.mysite.it/public/file…
0
votes
1 answer

How to tell Nginx to not rewrite URL's in selected location

I am writing some PHP CMS code with a clean url implementation in Nginx. To improve security of my code I want to rewrite all of the requests in my root directory / using the following type: rewrite ^(.*)$ /index.php?q=$1 last; With this kind of…
DeckTone
  • 11
  • 2
1 2 3
99
100