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)

2
votes
2answers
227 views

nginx rewrite regex for API versioning

What I want is for the first to be turned into the second.. /widget => /widget/index.php /widget/ => /widget/index.php /widget?act=list => ...
0
votes
0answers
74 views

iis reverse proxy: one default server and a fall-back

After spending dozens of hours to no avail, I am now asking for help with my IIS issue. I use IIS as a reverse proxy, which provides HTTPS encryption and authentication. The public site is, say, ...
-2
votes
1answer
138 views

Nginx rewrite rule not working

Can someone help me convert this rule? I have over 50 rules, but I can not make this rule work: #APACHE RewriteRule ^([^/]*)/([^/]*)\.html$ /?cmm=$1&page=$2 [L]
0
votes
1answer
429 views

IIS URL Rewrite - Redirect any HTTPS traffic to sub-domain

Our hosting environment dictates all secure traffic music travel over a particular sub-domain. We are using the .NET CMS Umbraco, which as far as I'm aware doesn't have any functionality to 'assign' ...
0
votes
0answers
8 views

IIS Global Input Options

Recently the site I was working on added language handling in this way: content tailored toward users of a certain language will have urls that start with baseUrl/[a-z]{2}-[a-z]{2}/... (I may be more ...
0
votes
1answer
87 views

Lighttpd splitting request URI and dropping query parameter

I'm running lighttpd 1.4.33, which is reverse proxied to from an Apache server that is open to the Internet. When accessing a script from the local address of the lighttpd server, GET parameters are ...
0
votes
0answers
240 views

Nginx PHP index.php rewrite not allowing proxy pass to '/writing'

What I'd like: I want to have the laravel site show unless it's for /writing. In that case I want it to proxy pass anything in that subdirectory to a nodejs site. What happens: The laravel site ...
0
votes
1answer
421 views

htaccess and rewrite - Internal redirect within Alias

I have the following .htaccess within a subdirectory: RewriteEngine on RewriteRule ^file.js$ file.php This works by internally redirecting the request to the PHP file, with the same name, which is ...
0
votes
1answer
60 views

can htaccess file define different RewriteBase for production and dev servers

I have htaccess files that use different RewriteBase on production and dev (windows) pc. Currently I change the RewriteBase manually when deploying. Can this be done automatically with some ...
0
votes
1answer
30 views

How can I have users coming from the internet and a private WAN access the same web portal?

I am trying to configure access to a web portal hosted on a private WAN for internet users, originally the plan was to use split-DNS to resolve the hostname depending on what ip the client was coming ...
0
votes
0answers
89 views

Multiple Rewrite rules not working in htaccess file (mod_rewrite)

Can anyone help me how to write multiple rewrite rules in htaccess file. In my condition I want to remove index.php from url and also want to use file based cache busting, I am using following code in ...
-1
votes
1answer
35 views

How to set up tomcat7 to forward all requests to the appname?

I have a tomcat7 server hosting my app. I've got port forwarding set up with iptables so right now you can access the app like so: http://ip-address-of-server/appname I've also set up the domain ...
0
votes
1answer
50 views

IIS maintenance with client IP exceptions

I'm have no experience with IIS server, but I will have to perform site update. Is there an easy way to put maintenance page, which will be shown to all clients except ones connected from predefined ...
0
votes
1answer
66 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 ...
-1
votes
1answer
65 views

IIS (or .htaccess) URL Rewrite not working correctly - need to capture number argument as query string

I'm trying to have: http://sub.domain.org/123456 become http://sub.domain.org/index.php?q=123456 I have tried many ways, and one way sort of worked, but then all subdirectories (including images) ...
0
votes
1answer
283 views

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; ...
0
votes
2answers
423 views

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 ...
0
votes
3answers
54 views

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 ...
0
votes
1answer
95 views

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/; ...
0
votes
2answers
29 views

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 ...
0
votes
1answer
85 views

How to modify querystring using URL rewriting?

I am having very less knowledge in URL rewriting, So not sure weather this can be done or not using URL rewrite? I have a URL like ...
0
votes
1answer
98 views

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 ☞ ...
0
votes
1answer
97 views

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 ...
0
votes
0answers
24 views

IIS7 Rewrite Rule for subdomains

I'm having trouble trying to figure out the proper syntax for a rewrite rule for subdomains in IIS7. I'm wanting to do the following: Change: www.anything.mydomain.com To: anything.mydomain.com ...
0
votes
1answer
176 views

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 ...
1
vote
1answer
175 views

Rewrite Location response header in lighttpd

I have an instance of lighttpd 1.4.35 listening for https traffic and reverse-proxying it to a back-end server. I.e., .----------. .----------. client ---https--> | ...
1
vote
1answer
37 views

ModRewrite combine sites to one

Hi I am having some issues configuring rewrites which have fairly complex requirements browsing (www.)A.com should => www.B.com browsing (www.)A.com/{anything}/blah/foo/yes should => ...
2
votes
5answers
372 views

Rewrite Rule: appending a path to URL

Update Thanks for all the replies so far. I'd like to make clear that the number after user (e.g. user1) in my example is not significant. The user can be any alphanumeric name. I want to make ...
0
votes
0answers
869 views

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: <?xml version="1.0" encoding="UTF-8"?> ...
0
votes
0answers
91 views

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: <Location /repos/svn> DAV svn SVNParentPath /usr/local/svn/repos SVNListParentPath On ...
0
votes
2answers
362 views

Nginx rewrite URLs but not static files

I need to rewrite URLs like http://www.domain.com/blog/wp-content/uploads/this-is-a-static-file.jpg to http://www.domain.com/wp-content/uploads/this-is-a-static-file.jpg I am using this rule: ...
0
votes
0answers
59 views

Wordpress permalinks on subfolder in iis7 not working

I have IIS 7.5. mod rewrite active. Currently, my wp site is inside subfolder. Here is web.config in my root folder : <rewrite> <rules> <rule name="site2.com" stopProcessing="true"> ...
0
votes
0answers
50 views

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 ...
0
votes
0answers
93 views

Configure IIS to rewrite all urls except HTTP POST uploads (formdata)?

Is it possible to have urlrewrite module rule in IIS to rewrite a request as long as it is NOT an HTTP POST upload (with formdata)? I believe post uploads have the content-type multipart/form-data, ...
0
votes
0answers
170 views

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 ...
0
votes
0answers
14 views

Setting up .htaccess with various pages and query vars

I am wanting to set up multiple rules, and so the system can be expanded I am wanting to use %{REQUEST_FILENAME} rather than having multiple rules set up. My structure at the moment is: ...
0
votes
1answer
337 views

Nginx Rewrite Rule For File Within Folder Not Working

Good evening everyone or possible early morning if you are in my neck of the woods. My problem seems trivial but after several hours of testing, researching and fiddling I can't seem to get this ...
0
votes
1answer
115 views

Apache: scope for environmental variables

While there's documentation available on Apache environmental variables, I can not find answer to one important question. Imagine I use rewrite rules to set environmental variable RewriteRule ... ... ...
0
votes
1answer
89 views

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 example: examplecom/luggage/delay/iberia ...
0
votes
0answers
46 views

Apache rewrite logged in username

I have included a git server in which users logs in with their username and password. By using the Basic Authentication, user are able to login without adding the domain (like DOMAIN\username). Here ...
1
vote
1answer
448 views

Redirect URL to a Tomcat webapp

I have a Tomcat server with two webapps, app1 and app2 (the app part is really the same). Each app has an independent group of users. I would like the groups to be able to access their respective app ...
0
votes
0answers
90 views

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 ...
3
votes
1answer
577 views

IIS web.config Old URL to New URL redirects

I'm new to redirects and having a hard time getting these to work, I have about 1400 URL's from an old site that need to redirect to a new site, same domain name, but different folders and domain ...
1
vote
0answers
20 views

How do I remove a segment without affecting another

Looking for help creating an IIS rewrite rule. We have a distributable product that is installed in an unknown base url We want to block /app and do so using: <remove segment="app"/> ...
2
votes
2answers
4k views

nginx url rewriting. i just don't get it

Ok, an example url is http://www.mysite.com/?p=account&view=settings the p uri is a constant. all urls have it. the view is one of many optional uri. i've tried to understand url rewriting ...
0
votes
1answer
268 views

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 ...
0
votes
1answer
937 views

Nginx URL virtual host rewrite issues with Magento e-commerce. Help please

I've been running into some serious problems with my URL rewrites and I can't seem to fix it on my own strength and knowledge and troubleshooting on the web! Basically what happens is that when I ...
0
votes
0answers
23 views

Rewrite rules in config not working

I'm trying to rewrite URL without the use of .htaccess In /etc/apache2/sites-enabled/000-default, I've made the following changes: <Directory /var/www/> Options Indexes FollowSymLinks ...
1
vote
2answers
174 views

nginx point subdomain to subfolder

I want http://blog.domain.com/ to point to http://www.domain.com/blog Just a notice, not to redirect to that location, but just point to it. Also /blog is not a folder. It could be blog.php for ...
1
vote
1answer
784 views

nginx - specify different index file name for subdirectory

I want the directory index file in the root of my site to be index.html but within a subdirectory /foo I want it to be bar.html i.e. /index.html /foo/bar.html Also I want requests to /foo or ...