Tagged Questions

URL rewriting allows websites to "re-write" or change the address displayed to a user the following is an example of a rewritten url and the original url (these are made up examples). original: http://www.domain.com/index.php?user=1 rewritten: http://www.domain.com/user/david

learn more… | top users | synonyms

0
votes
0answers
14 views

Apache to Nginx rewrite rules migraiton: why only root page is served?

I am migrating from apache to nginx with site that serves everything through single index.php file. And all examples of rewriting I can find are about wordpress or some arbitrary routing. In my case ...
2
votes
2answers
41 views

Rewrite URL Domain Name when IP address used

My apache home server listens for HTTP requests on an alternate port (port 8080), but I would like to let users type my domain name (example.com) without having to specify the port. So far I've ...
0
votes
1answer
21 views

nginx extending a rewrite rule with a condition

I have the following rewrite rule, used for WordPress Network to handle the file requests: location @rewrite { rewrite ^/(.*)$ ...
0
votes
1answer
17 views

Redirect a url to a new host

I have the following URL which displays a normal static website: www.example.com. This site is hoted on Amazon. I want to make all urls starting with www.example.com/redirect to redirect to another ...
0
votes
2answers
31 views

Apache: Serve all URLs on a domain with the index page, without rewriting path?

I'm writing a Backbone.js application that makes use of the HTML5 history API. I would like users to be able to create URLs of the form: domain.com/any domain.com/random ...
0
votes
2answers
47 views

Cant get RewriteCond rule to work in mod_rewrite

I have the following path: http://www.domain.com/cgi-bin/hsrun.exe/Distributed/Postphil/postphil.htx;start=DetectLanguage?Language=LANG_Icelandic If the path contains the folder /postphil I want to ...
0
votes
0answers
28 views

IIS & Tomcat integration with URL rewritting

I have a java webapp running in a Tomcat 6 server, on the same box I have the static part of the site being served from IIS 7.5. I've used ARR to successfully route the requests down into the Tomcat ...
0
votes
3answers
96 views

Host Multiple Web Applications Under a Single Domain

I have a single Domain that I would like to share across two web applications. One Wordpress, the other Rails hosted on two separate servers. Specifically, I would like a handful of url resources ...
0
votes
1answer
123 views

nginx proxypass rewrite base url

I'm trying to setup Nginx to forward requests to several backend services using proxy_pass. A few of them don't support being accessed under a sub-folder, so I have to add a rewrite to strip the ...
0
votes
2answers
119 views

Virtual hosts on apache to point domain.com, domain.net, domain.org to all go to domain.com

All of the names currently point to the same web server folder which is correct. That is, the domain.net, domain.org, etc all work without redirecting to the main .com How do I get visits to the .org ...
-1
votes
0answers
25 views

Apache rewrite rule to nginx

I'm migrating this Apache .htaccess rule to an nginx server, can someone help me remake it for nginx? RewriteRule ^(.*/?)category/.*/(.*)$ /$1life-style/fashion-blog/category/$2 [R=301,L] Thanks!
0
votes
1answer
70 views

(Probably) Simple mod_rewrite - remapping my site's URLs

This problem is driving me nuts. I've tried reading loads of tutorials about how to use mod_rewrite but I just can't get my head around it. These questions must get asked all the time, so apologies ...
0
votes
1answer
40 views

How to rewrite Rejected-By-Urlscan in ISS7

I'm migrating an ASP.NET app from IIS6 to IIS7 and in doing this I'm also porting my rewrite settings from Intelligencia.UrlRewriter to using IIS rewriting. In have some problems with ...
1
vote
1answer
30 views

Is it possible to have dynamic proxy_remote_match directives in apache2 or work around it somehow?

I am running a forward proxy, where I want to forward certain requests to different proxy servers using ProxyRemote. Which request goes to which server depends on many factors (time, load, url, host, ...
0
votes
1answer
32 views

Hyper-V Guest Connectivity Problems

I have one particular Hyper-V guest, one of 5 on this particular Hyper-V host, that can't seem to make any outgoing network connections. The guest is running Windows Server 2008 R2 SP1 and uses IIS ...
0
votes
1answer
31 views

ASP.Net url rewrite from …pdf to …aspx (IIS 7)

I am trying to rewrite a url for a pdf to an aspx page it isn't working. I doesen't see the request in my iis-log either. <rewrite> <rules> <rule name="PDF" ...
0
votes
1answer
45 views

Use apache to block a url with specific query string

I have this url: mysite.com?var=var&var2=var2&var3=var3 I would like to block this specific url but not in any way affect other query strings on the same base url. Is it possible to do ...
0
votes
1answer
89 views

URL Rewrite in IIS 7.5 not working

I am trying to redirect all http traffic to https as the site requires SSL. For example, if someone navigates to http://site.com or http://www.site.com I want to redirect the user to ...
0
votes
2answers
66 views

.htaccess mod_rewrite not interpreting friendly URL in IE (works on FF, Chrome, Safari)

I'm using mod_rewrite on my webpage to allow the proper handling of friendly URLs. It works perfectly in FF, Chrome, and Safari, yet in IE the friendly urls keep serving me up a 404 error (it's not ...
0
votes
1answer
42 views

IIS7: rewriteMap equivalent of exact match rule

I have a site at mydomain.com/mysite and I want to configure a set of redirections in IIS7. To redirect from mydomain.com/mysite/old.aspx to mydomain.com/mysite/new.aspx I can write: ...
0
votes
3answers
103 views

Redirect http://mydomain.com:12345 to https://mydomain.com:12345 in nginx

I know this must have been answered already, but I have been searching for quite a while, and cannot find the answer. Just not looking in the right place I guess, maybe someone can help me out. ...
0
votes
2answers
71 views

Redirect Rule for All Requests that Come with A Specific Server Alias

I am trying to write a redirect rule that will send all incoming requests directed at given server alias. Below is what my .conf file looks like. I am having problems with the first rule associated ...
0
votes
1answer
32 views

Apache url rewrite `-` to `_`

how to use url rewrite, change url from http://www.mydomain.com/this-is-a-new-article to http://www.mydomain.com/this_is_a_new_article? Use: # RewriteRule ^(.+?)-(.+?)$ (.+?)_(.+?) ...
1
vote
2answers
120 views

Apache mod_rewrite url rewrite

I want to rewrite an url with mod_rewrite from http://www.server.com/directory/public to http://www.server.com/directory (where directory would be then directing to directory/public) I've tried ...
1
vote
1answer
184 views

Using nginx to rewrite urls inside outgoing responses

We have a customer with a site running on Apache. Recently the site has been seeing increased load and as a stop gap we want to shift all the static content on the site to a cookieless domains, e.g. ...
0
votes
1answer
58 views

Nginx: Rewrite from base domain to a sub directory

I have a blog hosted at http://site.com/blog. How do I instruct nginx to rewrite requests from site.com to site.com/blog? This should not be permanent.
1
vote
3answers
101 views

.htaccess URL rewrite to multi-parameter item

I just spent the last 10 hours of my life on this & am running in circles, so was hoping someone may be able to help me. I want a specific URL to load like this: ...
1
vote
1answer
34 views

URL ReWrite for Windows Server (IIS)

Yesterday, I asked for help on urlrewrite - Ulrich Palha helped me to solve the problem. His solution is working great on Linux server using .htaccess, and I appreciate his help, but the solution ...
1
vote
0answers
56 views

django url matching with Lighttpd fastcgi

I have a problem with url. I can access the djando app home page ( localhost/djangotest/ ) but can't access the admin section ( localhost/djangotest/admin/ ). I can access it using the django server ...
0
votes
1answer
49 views

Why would the IIS UrlRewrite module continue redirecting requests after the rule is removed?

Our application uses the IIS UrlRewrite module to temporarily redirect requests during upgrades to a maintenance site. We have seen a few instances where even though the redirect rule has been ...
0
votes
1answer
187 views

htaccess rewrite all URLs (inc image hrefs) from one domain to another

I've got a wordpress blog on a subdirectory which I've recently migrated from a .com to a .co.uk (myurlstudio.com/blog to myurl.co.uk/blog). The problem is that many of the posts have images in them, ...
0
votes
0answers
95 views

IIS 7 URL Rewrite & Reverse Proxy With AJAX

I'm using URL Rewrite as part of a reverse proxy. I can get everything working fine for 99% of my use cases, but a small number of requests don't work right because URL Rewrite isn't being applied to ...
0
votes
1answer
80 views

.htaccess Rewriting Tomcat Server

I am writing a website using Railo. My code is to be deployed on a Railo Server running on Tomcat, overlayed on a regular Apache+PHP server. I need to send all requests to ...
0
votes
0answers
75 views

IIS7 URL Rewrite WordPress Permalink Works for subpages but NOT for first level pages

I have a very strange issue that I have never experienced before. WordPress 3.2 installed and running on Windows 2008 IIS 7 server, with URL Rewrite installed. Once I enabled the Permalink in ...
-2
votes
1answer
45 views

Using Nginx to remove part of a URL

The url is http://www.mysite.com/CMS/roundabout/drive and I need to remove the CMS portion and preserve the rest. I am stuck.
0
votes
0answers
112 views

Apache mod_rewrite weird behavior in Internet Explorer

I'm attempting to setup redirection for a couple of root domains. Firstly, here is the code in my httpd-vhosts.conf file: <VirtualHost *:80> ServerAdmin ****@example.com ServerName ...
0
votes
0answers
72 views

How do I bypass a url rewrite rule on IIS 7 for a specific Windows user account?

I'm using IIS 7 with the Microsoft URL Rewrite Module 2.0. I have a simple rule defined to redirect requests to an alternate directory. This part is working fine. However, I want to bypass the rule ...
0
votes
1answer
124 views

Apache htaccess RewriteRule to remove trailing slash; infinite loop?

I use the following in .htaccess (mod_rewrite) to remove the trailing slash from my URLs: RewriteRule ^([a-z0-9_-]+)/$ $1 [L,NC,R=301] Of course, since the character class doesn't match a slash, ...
0
votes
1answer
28 views

.htaccess rewrite issues with homepage

I have the following rewrite rule: RewriteEngine on RewriteRule ^([^/]+)/?$ parser.php?id=$1 [QSA,L] The issue is that when I try to access my homepage by www.site.com, it rewrites it as well to ...
0
votes
2answers
105 views

IIS Rewrite, rewrite maps and query strings

Please help me understand rewrite maps, I have this setup: <rewriteMap name="MyMap"> <add key="/pages" value="/website/pages/index.aspx" /> <add key="/pages/page-1" ...
1
vote
2answers
69 views

Rewriting URL based on hostname

Is it possible to use .htaccess file to rewrite this: http://customer1.com/app/assets/css into this: http://customer1.com/app/customers/customer1/assets/css? If it is then how? EDIT: The goal is ...
1
vote
1answer
52 views

Why doesn't this redirect work?

I have some URIs which have been published or shared which I now need to redirect. The old urls take the form: http://www.mysite.com/!#story/45 and I want to redirect them to ...
1
vote
1answer
97 views

iis7 url rewrite (remove .aspx) and getting error 404

I have an issue with IIS7 url rewrite module, when I add following rule I get an 404 error on all pages. <rule name="Remove .aspx" stopProcessing="true"> <match url="(.+)\.aspx" /> ...
0
votes
1answer
32 views

Is it possible to to randomly redirect users using IIS URLRewrite?

If I would like to randonly redirect users to different parts of the page to conduct testing is it possible to do so with rewrite rules and in particular with IIS URL Rewrite tool?
0
votes
1answer
87 views

IIS 7 URL Rewriting Rule for images not referred by the website itself

New to URL rewriting with IIS 7. I need to redirect to another page for images not referred by the website itself. For example is someone enters "www.somesite.com/images/image001.jpg" into their ...
1
vote
0answers
124 views

lighttpd reverse proxy rewrite

I am trying to configure lighttpd (v1.5) as a reverse proxy. Gollum is running on port 8080 and I've setup lighttpd.conf as per the following: $HTTP["url"] =~ "^/wiki.*" { proxy-core.protocol = ...
0
votes
1answer
55 views

Rewriting a query-string part as a path part using nginx?

How do I rewrite URIs of the form /one/two?path=three&foo=bar to /one/two/three?foo=bar using nginx?
0
votes
1answer
48 views

URL Rewrite and mod_jk

I want to redefine the base URL of a Tomcat webservice, mounted with JkMount. I tried the following: JkMount /myapp/* ajp13_worker RewriteRule ^/service/v1/(.*)$ /myapp/$1 [PT,QSA] The original ...
0
votes
1answer
48 views

301 redirect for all content - domain.org to domain.com

After trying several solutions I just can't seem to get this to work. I owned a .org and had urls like http://mydomain.org/view/3242343 http://mydomain.org/login http://mydomain.org/page/5 and I ...
0
votes
4answers
112 views

nginx rewrite specific sub domains

I am trying to rerwrite any sub domains outside of an approved list i.e. (dev,test,home).domain.com here is what I am working with now: #rewrite all sub domains if ($host ~* ...

1 2 3 4 5 6