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.

learn more… | top users | synonyms (5)

0
votes
1answer
26 views

Nginx search query rewrite rule

Currently I have my rewrite queries like so rewrite ^/category/category-name /index.php?route=information/category-name last; This works fine for my pages that are static and i know the name to. ...
0
votes
1answer
48 views

Nginx specific rewrite [closed]

i am confused in nginx rewrite. please help me if can..Thanks you xxxx.conf #vhost-xxxxx server { listen 80; server_name xxxx.xxxx.com; root /var/www/html; ...
0
votes
0answers
31 views

Rewrite Query String to Display as Subdomain in Browser?

I have search every possible resource however, I have not been able to find the help i need so i thought i would ask here. I am not highly educated in .htaccess rewrites so please bare with me if i ...
0
votes
0answers
6 views

htaccess rewrite incoming links to new one [duplicate]

I'm having a problem with site migration and old links. Now, its not just a server migration, it was also a CMS migration. Site went from umbraco (asp.net) to wordpress. Problem is that google indexed ...
2
votes
1answer
88 views

nginx single page js app pushstate vs wordpress rewrite rules

I would like to add: /client subfolder containing backbone js app (with pushstate) /admin subfolder containing backbone js app (with or without pushstate) And when I open my http://example.dev/client ...
15
votes
4answers
28k views

nginx + PHP-FPM = “permission denied” error 13 in nginx log; configuration mistake?

I've got nginx 0.7x + PHP-FPM running under PHP 5.2.10 on one RHEL5 server, but trying to duplicate that setup under the bundled-in PHP-FPM in PHP 5.3.3 on a second server, I'm having some trouble ...
1
vote
0answers
28 views

forward proxy with URL rewrite

Apologies if this is a newbie question -- I can't believe its hard, so I must be missing something. I have an application at https://example.com/application/* . It makes use of PNGs sourced from ...
1
vote
0answers
29 views

Copy PHP website to virtual folder under IIS 8.5

I would like to make an existing PHP Website (Apache) run on a virtual folder under IIS 8.5. With the help of some nice online tools I translated the following .htaccess content: <IfModule ...
-1
votes
1answer
37 views

Nginx redirect 2 level subpaths

I have the following redirect rule: rewrite ^/path1/(.+)$ /path1/index.php?/$1 last; rewrite ^/path2/(.+)$ /path2/index.php?/$1 last; rewrite ^/path3/(.+)$ /path3/index.php?/$...
0
votes
1answer
53 views

nginx rewrite link with wordpress

I have broken link on my WP blog, which is on this route www.site.com/wp-content/plugins/download-monitor/download.php?id=1 But when I want to redirect it to completly new site, my rewrite rule ...
13
votes
3answers
25k views

How to rewrite the domain part of Set-Cookie in a nginx reverse proxy?

I have a simple nginx reverse proxy: server { server_name external.domain.com; location / { proxy_pass http://backend.int/; } } The problem is that Set-Cookie response headers contain ;...
1
vote
1answer
30 views

Haproxy redirect to different subdomain

I am trying to redirect one url example.com/blog to blog.example.com using haproxy. I have applied following rule: acl blog_path path_beg -i /blog/ redirect location http://blog.example.com/ code ...
0
votes
0answers
14 views

url rewrite - 2 rules, one rule triggers other rules response

I have 2 rules in play, one at server level, to check for exploits n hacks across the whole server, which if triggered redirects to a url with certain parameters which logs the info of the hack. The ...
-1
votes
1answer
32 views

rewrite after rewrite in nginx

i have: nginx server site based on joomla rewrite like this in server block location / { # Support Clean (aka Search Engine Friendly) URLs try_files $uri $uri/ /index.php?$args; } this ...
2
votes
0answers
78 views

Combined redirects in Nginx

We are using Nginx and want to reduce the number of "chained" redirects we have. So, for example: URL A - http://www.sitename.co.uk/SHOPPING-CATEGORIES/product_name redirects to its https version (...
1
vote
2answers
107 views

Clean URLs and php extension on nginx

I've looked at dozens of other questions and references on the web - and by all my calculations, my setup should work, but it doesn't. I have nginx installation with php-fpm. If I try to access a ....
-1
votes
1answer
39 views

Apache to nginx migration: friendly urls. Rewrite and post data

I am migrating a little API from apache to nginx and I have changed the htaccess file to location rules in nginx config file. I have a POST request that is loosing the post data. This is the ...
3
votes
1answer
2k views

IIS IP Logging through reverse Proxy (Cloudflare)

I'm using an IIS server behind the nice "Cloudflare" reverse proxy. This reverse proxy farm exposes a HTTP header to my server, namely HTTP_CF_CONNECTING_IP. It contains the IP that connects to ...
0
votes
1answer
373 views

How to use # in url as a redirect rule in htaccess for apache

I am having a difficult time figuring out how to have the following work: I am trying to redirect a url in htaccess I am trying to redirect from example.com/test.html to example.com/index#test I ...
0
votes
1answer
533 views

Apache rewrite - optional parameters?

I'm creating SEO friendly urls for my news page. My links look like this : www.site.com/1234/the-pretty-url-string/ RewriteRule ^([^/])/([^/])/$ /news.php?sid=$1&url=$2 [L] This works great, ...
0
votes
1answer
58 views

Subdomain With Custom URL/Domain

I have a subdomain called 'mysite' at this.example.org/mysite which needs to resolve to mysite.org in the address bar. Can this be accomplished with .htaccess in the mysite public_html folder, or ...
-1
votes
1answer
40 views

Case insensitivity in nginx [duplicate]

We have several SEO pages like: http://www.example.com/PageOne.html Which we redirect in config like: location = /PageOne.html { rewrite ^/(.*) /seo.php?id=1 last; } Problem is if a user ...
2
votes
1answer
92 views

Nginx rewrite, reset rewrite or add extensions to a specific directory

Here's my nginx site config: server { server_name DOMAIN.COM; access_log /srv/www/DOMAIN.COM/logs/access.log; error_log /srv/www/DOMAIN.COM/logs/error.log; root /srv/www/DOMAIN.COM/public_html; ...
2
votes
1answer
47 views

Nginx rewrite: remove ? after filename.php

Here's my current nginx site config: server { server_name DOMAIN; access_log /srv/www/DOMAIN/logs/access.log; error_log /srv/www/DOMAIN/logs/error.log; root /srv/www/DOMAIN/public_html; location / { ...
0
votes
2answers
34 views

NginX redirect domain.com to domain.com/path when accessing domain.com

So basically I had to proxypass the root of a web server @ / but the application is hosted at /ui When they don't manually type /ui they are presented with the home page of the server, which is ...
0
votes
0answers
21 views

Pass request cookies to Squid url_rewrite_program

I am using Squid to rewrite requests and cache them. I have written a squid url_rewrite_program using python to rewrite request. Basic rewriting works well. But most of the requests have cookies ...
15
votes
4answers
48k views

Nginx redirect one path to another

I'm sure this has been asked before, but I can't find a solution that works. A website has switched CMS services, but has the same domain, how do I set up an nginx rewrite for a single page? E.g. ...
0
votes
0answers
35 views

Rewrite and redirect from two parameter dynamic URL to a static URL with .htaccess, Second Parameter should be comma seperated

I am trying to rewrite and redirect from http://example.com/page.php?fid=123&name=title%20of%20the%20blog to http://example.com/name/title-of-the-blog.jsp. So that if either of the above URLs is ...
0
votes
0answers
35 views

Redirect iis to RD web access on another server

I am deploying a new windows 2012 server with remote desktop services role. I already have another windows 2008 r2 server that serves as my web- and exchangeserver. When i request the rd web access ...
0
votes
1answer
63 views

Getting Nginx working with /index.php/something

I'm trying to migrate from Apache to Nginx. I'm using Nginx 1.8.1 and PHP 5.6 Apache accepts URLs like this: domain.com/site/index.php/something and calls index.php script with the parameter /...
1
vote
1answer
64 views

How to delete hyphen and underscore from url string in nginx?

I have been trying to delete ANY/ALL hyphens - and underscores _ from an incoming URL request to my nginx server. So to be clear, when someone enters a URL as follows: https://www.example.com/my-...
0
votes
0answers
22 views

A specific issue with Apache 2.2 URL rewriting

How can I use mod_rewrite to change the URL from http://mindnmotion.com/mindnmotion/2015/12/26/poverty-and-homelessness/ to http://mindnmotion.com/2015/12/26/poverty-and-homelessness/ I do not have ...
0
votes
1answer
50 views

My nginx conf disallow real folders access and index

I have Cockpit CMS installed and with this conf file, every real folders where I have files or subwebsites that I want to share or access are interpreted as 404 pages, I guess because of this part : ...
0
votes
1answer
70 views

Using URL Rewrite and ARR for redirecting to same server

The scenario: A web server running a single site under two different addresses: www.mysite.com (regular site) ws1.mysite.com (web services) Both are accessible via HTTPS, and both are running on ...
0
votes
1answer
24 views

IIS URL Rewrite - Rewriting for subfolders to pages

All, I have spent almost a day trying to figure this out. I am helpless now after all the searches and want to reach out to the community. I want to redirect any traffic on my website based on the ...
2
votes
1answer
3k views

IIS rewrite rule to check for querystring and add it if its not there

I'm trying to make a IIS URL rewrite rule that appends an URL parameter to the URL. The url parameter is hssc. So, any url that is processed through the server, needs that parameter. Keeping in mind ...
0
votes
0answers
12 views

IIS “”URL-Rewrite“ Rule to forward all requests ”made to a folder“ ”to a specific file"?

I'd like to forward all requests made to: http://domain.com/api (like http://domain.com/api/getUsers or http://domain.com/api/newUser) to http://domain.com/api/index.php So, if a user requests ...
1
vote
0answers
36 views

Apache rewrite rule 403 error

I'm running Apache 2.2.15 with rewrite_module installed. I have rule in my vhost.conf as follows; RewriteRule \n ^/advanced/selector/profiles/([A-Za-z0-9]+)/?$ \n "/advanced/selector/profiles/...
0
votes
2answers
174 views

Nginx serve plain file if exists else serve /index.php

I want Nginx to serve any requests for static files on its own, but if the file doesn't exist, then serve index.php which will handle it all Currently my configuration looks like this, server { ...
0
votes
3answers
154 views

How to make Apache’s mod_rewrite redirect over HTTPS by default?

Let’s say I have a website that is available over HTTPS, e.g. https://example.com/foo. Consider the following .htaccess: RewriteBase / RewriteEngine On RewriteRule ^foo$ bar [R=301,L] Now, when I ...
0
votes
0answers
106 views

Fix ERR_TOO_MANY_REDIRECTS after adding trailing slash in URL

I have a Magento website hosted in a managed server where we need to use two .htaccess files, the first one is needed to redirect all request to a subfolder /current/src/ and is placed directly in ...
0
votes
1answer
27 views

Add a path after / to http request in HAProxxy

I am currently redirecting my users from get.foo.com to foodownload.com, and then they can click and download bar.mp4. I want before redirecting, change the path, so by entering get.foo.com, their url ...
0
votes
0answers
16 views

IIS URL rewrite with exclusion rule

The rewrite rule below rewrites any URLs starting with either "profiles" or "jobs", e.g. www.example.com/profiles or www.example.com/jobs. That works, but I want it to work, UNLESS a "/" and a number ...
0
votes
1answer
30 views

URL rewriting Issue with html pages in IIS6 asp.net (2.0) application

I am using URL rewriting for asp.net (2.0)application on Server 2003 with IIS 6 Website url example mywebsite.com and mywebsite.com/blog. mywebsite.com runnig with.aspx and .html pages Database: SQL ...
0
votes
1answer
85 views

nginx: String Replace plus sign with hyphen

I am trying to rewrite hundreds of URLs, and I've gotten pretty close except for one scenario. Some URLs look like this: /city/?sl_city=CityName&directory_nonce=45ad967e02 But some have a + as ...
0
votes
1answer
91 views

url rewrite, nginx throw 404 errors, nothing in error logs

below rewrite works fine: rewrite ^/city/restaurants$ /city/listings/restaurants permanent; but this doesnt work rewrite ^/city/restaurants$ /city/listings/restaurants last; rewrite ^/city/...
1
vote
2answers
347 views

Redirecting www to non-www (apache, letsencrypt )

Ubuntu 14.04 Apache 2.4.18 I have set up a SSL certificate using letsencrypt. It works well but in order to work, I cannot have multiple vhost defined in one virtualhost configuration file. Each ...
0
votes
0answers
58 views

laravel site using hhvm broke rewriting url

I tried to find a solution everywhere, even if the answers look close to my issue I was not able to have the correct solution. I built a website with laravel. My config is the following : laravel 5....
0
votes
1answer
215 views

Apache redirect - let's encrypt SSL certificate redirecting to naked domain rather than www

I recently set up a new website running off Wordpress which is working nicely. Since I wanted to have an SSL certificate for the website I thought I'd use Let's Encrypt since I've been hearing a lot ...
0
votes
0answers
78 views

Enable Rewrite in nginx

rewrite not working, this is my nginx -V and installed via 'apt-get' how to enable 'rewrite' module ? root@server:~# nginx -V nginx version: nginx/1.9.9 built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14....