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
107 views

mod_rewrite not working for apache alias

I have created a documentation wiki that i want to attach to my main site using an Alias for the virtual host. This allows me to access the wiki by going to website.com/documentation. I have ...
0
votes
0answers
43 views

Simple URL Redirection in IIS

I've made the following rule in the web.config in the wwwroot folder: <rewrite> <rules> <rule name="umo to google" patternSyntax="Wildcard" stopProcessing="true"> ...
0
votes
1answer
263 views

Nginx config for Magento subfolder multistore

I'm moving from subdomain to subfolder. I have multiple subfolders for several countries. I changed the domain in the Magento administration. But the Nginx rewrite doesn't seem to work. I have 1 ...
1
vote
1answer
161 views

Nginx Config Location Regex With Language Code In Url

Trying to achieve constant language code in url's 1st segment with nginx regex location configuration and could not find the correct syntax. Necessary result: example.com stays example.com example....
0
votes
1answer
32 views

Redirect 404 to parent category

If a user hits a 404 I'd like the user to be redirected to the parent category. The expected behaviour I'm looking for is the following examples www.test.co.uk/category/product404page > www.test....
0
votes
0answers
25 views

implementing friendly urls on an nginx-ubuntu server

Currently my website's url are like this: https://www.mywebsite.com/fx/?category-name=abc (category page) https://www.mywebsite.com/fx/?category-name=abc&article-name=xyz (article page) The ...
0
votes
1answer
54 views

Redirect 404's within a certain directory to index.php

I'm trying to redirect all 404 messages to the index page, but only within certain directories/categories. For example 404's within the following dir's will display as normal www.foo.com/ www.foo....
0
votes
0answers
12 views

Rewrite Rule from sub directory web root [duplicate]

I want to make a one time change to my website URL structure. I want to rewrite URLs from /2015/11/sample-post/ to /sample-post/ - I don't care about the existential dilemmas caused by such a ...
1
vote
1answer
47 views

Nginx always rewriting to ssl even on non ssl sites

I have a page example.com, which has ssl certificates setup and everything is working fine. Here is the ssl part of the config: server { listen 80 default_server; server_name www.example.com ...
1
vote
1answer
52 views

Apache rewrite rule to iis

I am trying to move site on apache to iis 8.5 All is ok, but 1 rule failes my site to run properly RewriteCond %{REQUEST_URI} !\.(js|css|jpg|jpeg|gif|png)$ [or] RewriteCond %{REQUEST_URI} apple-...
0
votes
1answer
17 views

How do I prevent RewriteRules conflicting

I have three RewriteRules I am trying to implement but I cannot get all 3 to work together: RewriteRule ^products$ http://%{SERVER_NAME}/en_ca/products [L,R=301] RewriteRule ^products/(.*)$ http://%{...
0
votes
0answers
119 views

nginx url rewriting , file not found, codeigniter

I have this line in my config nginx file location / { try_files $uri $uri/ /index.php; } but this request always triggers a not found error: example.com/file.php how can I catch this ...
1
vote
1answer
13 views

IIS Rewrite using IIS Manager

Hi there I am attempted to do a proper IIS rewrite utilizing the IIS manager credentials my hosting provider has given me. I have no experience with this and the articles I have read online so far ...
0
votes
0answers
42 views

nginx redirect all URI requests with query strings/arguments to the equivalent without

I was reading around about removing query strings/arguments from all requests by way of redirection like $1?$argument to just $1. I tried what the documentation said in adding a ? to the end of the ...
0
votes
0answers
11 views

Multiple domains pointing to one server. Using a rewrite rule to set preferred domain

I just launched a new website for a client. As part of the new launch I want to try and sort out their domains. Currently they have 3 domains all pointing to the same server which is bad when it comes ...
0
votes
1answer
19 views

How to redirect to different domains based on if there is any text after .com/?

I have some basic competency here, I can do one of these or the other, but cannot figure out how to do both: If a user goes to www.example.com/anydatahere, I need to pass the anydatahere to a purl ...
0
votes
0answers
31 views

Translating DNS Server Replys because of multiple NAT Networks

I am planning and building a large infrastructure wich different natted networks. Lets say I have a datacenter network 10.0.0.0/24 and I have many different customer networks that could be anything (...
0
votes
1answer
47 views

nginx: How do I redirect all requests to the frontpage?

I am shutting down a website and am stumped on a really simple problem; I need to redirect all URLs to the homepage (except, obviously, the homepage itself). I thought this should work, but it causes ...
1
vote
0answers
66 views

Nginx url rewrite stops going through location code

I'm trying to configure my Phalcon (php framework) project on Nginx. Unfortunately I can't manage to make the rewrite work. In order to better understand my problem please check out the config file: ...
1
vote
1answer
54 views

Wrong or misconfigured rewrite by nginx 1.8

I have the 2 nginx's conf files ssl.conf and default.conf under /etc/nginx/conf.d/. The first file handles incoming http request. It rewrites the http request to https. And the ssl.conf file handles ...
0
votes
1answer
89 views

Joomla “pretty urls” with nginx allow index.php/pretty/url as well as index.phppretty/url (notice the absence of slash)

I am trying to install my first LEMP stack and, after a lot of hours and reading, it's working pretty well (Damn, the www-data group write permissions issue was a tough one). Anyway, my Joomla site ...
2
votes
1answer
126 views

Apache RewriteRule 502 Error on dev server, works on live

I'm on Apache 2.2.15. My vhost.conf contains a RewriteRule to handle article URLs; # handling for neat article titles RewriteRule ^/news/[0-9]{4}/[A-za-z]{3}/([0-9a-zA-Z-]*)/([0-9]{4})([0-9]{6})/?$ "/...
0
votes
0answers
69 views

Rewrite /a/1/2 to /a.php using Nginx

I'm taking over a really old app and migrating it from apache to nginx. What I currently have. This works: # catch specific paths, rewrite to first segment # /a/1/2 => a.php # /b/3/4 => b.php #...
0
votes
1answer
20 views

Redirect loop in apache rewrite rules

I am trying the following redirect rule, but it ends in redirect loop. Is there any way to avoid it? There are multiple domains and based on the file accesses respective file should be served from ...
-1
votes
2answers
23 views

Rewrite domain to cut its URI [duplicate]

I need to set up the domain.com/wp1/ to be shown like domain.com/ I have tried to set up any rewrite in the past hours, but no success :( P.S. There is a wordpress installed in the public_html/wp1, ...
1
vote
0answers
125 views

How to SOAP over a proxy server I own(configuration)?

I have a server called http://SERVER-A.com which sends a SOAP request to a third-party address. Also I have another server called http://Server-B.com which I want to configure as a proxy server. I ...
1
vote
0answers
23 views

Make Varnish check for html static before serving

I was thinking of writing some logics to my application so that it can write the static page content to s3 or some CDN and serve primarily from there. But am not sure if this is possible. For ...
0
votes
0answers
54 views

IIS7 (Azure) HTTP -> HTTPS redirect fails with certain query strings

These are how my rules are setup for a NodeJS application running on Azure: <rewrite> <rules> <clear /> <rule name="Force HTTPS" enabled="true" stopProcessing="false"&...
-3
votes
2answers
33 views

apache conf entry does not work but does in .htaccess [closed]

i am running: Server version: Apache/2.2.15 (Unix) i have a custom security conf file on a shared server. i placed the following entry at the top of the file with no joy, and i also placed it at ...
1
vote
2answers
76 views

Postfix rewrite recipient based on domain

I'm looking for a postfix configuration to create recipient rewrite rules based on the recipient domain name including catch all for domains not found in the "not rewrite"-list. For example: laber@...
0
votes
0answers
38 views

Nginx convert URL to path on server

I have a problem with converting URL into path to file. For example. I want open file /var/www/html/dir1/dir2/dir3/file_one.conf in browser by link http://domain.com/dir1.dir2.dir3.file_one ...
-1
votes
1answer
53 views

Converting .htaccess rule to nginx not working

.htaccess rules: RewriteEngine On RewriteCond %{QUERY_STRING} (.*) RewriteRule ^yon-(.*).mp4$ index.php?videodata=$1&yonlendir=true&%1 [NC] RewriteCond %{QUERY_STRING} (.*) ...
0
votes
1answer
24 views

How is leading slashes handled in server and in client?

I am trying to create a RewriteRule, but it's unreliable and I can't figure out what is happening. Here's my rule: RewriteRule ^docs/(......)/$ index.php?docid=$1 [L] the problem is leading slashes,...
1
vote
1answer
216 views

NGINX URL with parameter rewrite to URL without parameter

I have an NGINX background on my server. I cannot figure out why my rules doesn't work. How can I redirect or rewrite it so I could open URL with the same content, for example: http://www.example....
0
votes
2answers
63 views

Nginx URI redirect (regular expressions)

I plan to rename one of my site's menu and I'll need to catch the old SEF urls and rewrite them to the new ones. One portion to change is in the middle of URL (old to new) and the other is at the end (...
0
votes
0answers
9 views

combining 2 rules into 1 to account for .aspx extension

I have 2 re-write rules in IIS7 to account for a url with or without .aspx extension. <rule name="Product .aspx" stopProcessing="true"> <match url="^(.*)Products/...
1
vote
1answer
30 views

Redirect to HTTPS and subdirectory is visible [duplicate]

I am forcing HTTPS and redirecting to subdirectory with: RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301] RewriteCond %{HTTP_HOST} ^domain.com$ [NC,OR] ...
1
vote
2answers
197 views

nginx -> serve different files using try_files based on cookies (conditions, if, then, else)

I need to configure an nginx server so that: If user has a specific cookie so the server must send a file, else the server must send another one. I read plenty of related articles, but nothing helped, ...
-1
votes
1answer
35 views

What is the Ideal way to spoof files in nginx (alias, try_files or rewrite)

I'm trying to spoof file location by sending long url to the server, the server translate it to the proper php file and return the result, example: I send a link like this: http://example.com/...
-1
votes
1answer
68 views

nginx rewrite based on args

got links on old site like /aaaa/bbbb/cccc.php?SECTION_ID=112233 So i need redirects based on value of SECTION_ID for example /aaaa/bbbb/cccc.php?SECTION_ID=112233 leads to /aaaa/cccc/, but /aaaa/...
0
votes
0answers
121 views

How to haproxy rewrite http header

I have 1 haproxy server hosting for website.com and 1 nginx server hosting for static.website.com . I want when haproxy receive http request for http://website.com/static/image.jpg it will rewrite: ...
0
votes
1answer
26 views

nginx regex rewrite rule for images

I have the following URLs: www.example.com/data/images/13122013-002_IM1621.jpg www.example.com/data/images/13122013-002_IM1622.jpg www.example.com/data/images/13122013-002_IM1622.jpg On the file ...
1
vote
0answers
113 views

Appending URL subdomain as URL path in HAProxy

I want to convert following URL: http://subdomain.example.com/a/b/c To this: http://example.com/subdomain/a/b/c In HAProxy. Thanks a lot
0
votes
1answer
120 views

VirtualHost/htacess : how to point a subdomain to an url parameter?

I must to create a multi-languages website. In order to achieve this aim, I want to point subdomain representing a language to the 1rst url parameter (GET variable) of the domain in my virtualhost ...
0
votes
1answer
169 views

Configuring IIS rewrite module to redirect any host name to a specific host name

I have a website whose name I am changing from example.com to newexample.com. My thought process (please comment on this as well, as my approach may be incorrect) was to configure permanent a ...
0
votes
0answers
75 views

IIS url rewrite with rewritemaps non working

on IIS 7 windows 2008r2 we are have URL rewrite module working with external rewrite config files working fine. When I try to add an extral rule to redirect a special path to another site it doesn't ...
0
votes
1answer
19 views

proxy with rewrite including headers

I'm trying to figure out the easiest way to proxy a wordpress site to a subdirectory of another site. So, I have a wordpress site articles.blah.com/subdir/. It writes html with absolute paths like ...
0
votes
2answers
116 views

IIS reverse proxy / re-write rule to redirect requests to another port

I am attempting to rewrite requests for http://redmine (where IIS is bound) to http://web01:8080/redmine (where apache is bound and ruby is serving redmine). Noet that I also have an A record binding ...
-2
votes
1answer
87 views

remove everything but domain name from url

I am looking if the is an easy way to keep the webpage always with the URL like: http://example.com at the time there are request like http://example.com?target=dirigido http://example.com/a-quien-...
-2
votes
1answer
28 views

.htaccess rule not working [closed]

This is my .htaccess code ... the first condition is working and the other one is not RewriteEngine On RewriteRule ^([\w-]+)/?$ Page.php?PageID=$1 [L] # Process parrots RewriteRule ^([\...