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)

1
vote
0answers
354 views

htaccess: Is it possible to ask with rewritecond if the request was already redirect? [closed]

I'm having a redirect loop and it could be solved by asking with rewritecond if this is the first time since user request, or it's jumping already. Is it posibble to know inside .htaccess? Thanks in ...
1
vote
1answer
368 views

Nginx rewrite without redirect

I want url domain.com/foo-111 to load contents from directory /bar/111 but not change url. I created a rewrite rule but instead of loading contents of proper directory, it 301 redirects to ...
1
vote
2answers
1k views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
0
votes
0answers
347 views

Ignore certain endpoints in nginx SSL rewrite rule

I am currently redirecting all traffic on my site to https using the following rewrite rule: if ($ssl_protocol = "") { rewrite ^ https://$host$request_uri? permanent; } I would like ...
0
votes
0answers
17 views

URL redirect for a domain & URL (Window Server 2012)

I am shutting down an old intranet application, and in order to please my users, I would like to have a friendly page that tells them where they need to look instead. Another team however have ...
1
vote
1answer
19 views

Nginx rewrite to remove .php from files has no effect but to redirect to homepage

I'm trying to make a rewrite to remove .php from my URLs but so far no luck. Here's what I've got so far and then my results with this config below. location ~ \.php$ { try_files $uri/ ...
1
vote
1answer
55 views

Apache redirect some url to homepage

I am trying to implement a simple rewrite, but looks like i am doing something wrong. What I am trying to do is that I have a url blog.example.com/articles/ which gives me 404 , and other urls are ...
1
vote
2answers
35 views

Migrating rewrite rules under subdirectory from Apache to IIS

In the old Apache hosting, we had the following .htaccess file inside public_html/adm: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
1
vote
2answers
753 views

Conditionally Rewrite Email Headers (From & Reply-To) Exchange 2010

I have a client who maintains Company A (with email addresses %username%@companyA.com) and they own the domain companyB.com however there is no "infrastructure" (no Exchange server) set up ...
0
votes
0answers
12 views

lighttpd rewrite in magento

I'm currently using below code in lighttpd.conf to redirect http to https. $HTTP["scheme"] == "http" { $HTTP["host"] =~ ".*" { url.redirect = (".*" => "https://%0$0") } } ...
0
votes
0answers
14 views

Apache rewrite config stops working after migrating to new system

I need help with mod_rewrite commands. After migrating to a new server on Apache 2.4.6 my rules stopped working. Basically I need to divert all traffic to HTTPS except link that contains ...
0
votes
1answer
57 views

Nginx rewrite root to sub-folder without changing server root

I am trying to move an old app to nginx from apache but I froze on here. The /.htaccess RewriteEngine on RewriteRule ^(.*) public/$1 [L] The /public/.htaccess Options +Indexes +FollowSymLinks ...
0
votes
0answers
16 views

Application Requst Routing (ARR) proxy chain - 407 proxy requires authentication

Is there any way to provide credentials to the upstream (chained) proxy in ARR? I am using URLRewrite and ARR to reverse proxy an internal HTTP request to an Internet Site. In the corporate ...
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
43 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
24 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
51 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 ...
14
votes
4answers
26k 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
23 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
21 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
32 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/(.+)$ ...
0
votes
1answer
50 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 ...
12
votes
3answers
23k 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
22 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
11 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
29 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
74 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
79 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
34 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
341 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
528 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
57 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
36 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
84 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
39 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
30 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
14 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 ...
11
votes
4answers
44k 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
20 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
22 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
57 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
49 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: ...
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
46 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
42 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
19 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 ...