Tagged Questions

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
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
331 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
727 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
70 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
302 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
54 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
44 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
87 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
164 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
13 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
289 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
110 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
84 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
43 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
259 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
86 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
521 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
18 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
3k 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
230 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
719 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
153 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
551 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 ...
0
votes
1answer
1k views

IIS 7 Url Rewrite Not Working

Inbound IIS7 Url Rewrite Rule not working Below is the URL Rewrite rule I've defined. <rewrite> <rules> <rule name="Redirect domain.co.uk to www.domain.co.uk" ...
0
votes
1answer
55 views

RewriteRule Not Rewriting URL properly [duplicate]

I have the following virtual host file: <IfModule !wsgi_module> LoadModule wsgi_module modules/mod_wsgi.so WSGISocketPrefix run/wsgi </IfModule> <VirtualHost *:80> ...
0
votes
0answers
211 views

IIS 7.5 ARR rewrite rules equivalent for Apache mod_proxy rules

I'm trying to put RabbitMQ management interface behind a load balancer, using IIS 7.5 and ARR, whereby I'm routing rabbit.mydomain.local to localhost:15672. While I get the traffic to route, all api ...
0
votes
1answer
188 views

Lighttpd rewrite rule for Flight PHP microframework

I'm using the Flight PHP microframework, and it includes its' own router, and needs the server to rewrite requests to the index.php file. It features rewrite-rules for both Apache and Nginx but ...
1
vote
1answer
769 views

IIS URL Rewrite rule to redirect subdirectory traffic to https

I have a site where I've written an URL rewrite rule to direct all site.com traffic to www.site.com. Works fine. Now I want to add SSL to an application on a subdirectory. I've added the SSL to the ...
1
vote
2answers
3k views

Nginx: rewriting https:// to http://

I'm trying to get Nginx to rewrite incoming requests to a site my server prefixed with https:// to http:// (this is because a CMS used on this site forces URIs instead of relative paths -- essentially ...
1
vote
2answers
96 views

Apache2 and rewritemap - hours of trying

I stuck with rewritemap problem. What I want to do is redirect thousands of old nearly random urls to new ones. I will build map manually, but I need this code to work. RewriteCond ...
1
vote
1answer
317 views

How to add rewrite rule for redirecting url in Apache Web Server

I am trying to configure autodiscover feature of outlook and thunderbird for my mail server. I have added a virtualhost entry with following rewrite rule to redirect config-v1.1.xml to ...
0
votes
1answer
160 views

IIS 7.5 Reverse Proxy URL Re-Write to website with gzip

If we own www.ourdomain.com and wanted to rewrite the url to say www.google.com, how would we deal with gzip compression on say the google domain. I'm trying to do a proof of concept and i believe the ...
2
votes
1answer
1k views

IIS Reverse Proxy Not Working With Response.Redirect() in ASP.NET

I am trying to set up a reverse proxy, using the tutorials here, here and here. The site is set up on localhost:8080, with the reverse proxy using localhost:8080/myProxy. When dealing with standard ...
0
votes
1answer
95 views

Static Wordpress Multi-Site Rules From Apache to Nginx

I have been reading and trying things for 3 days, but I can't seem to get the right combination of rules to do what the Apache2 server did. The Apache2 rules are: RewriteRule ...
1
vote
1answer
311 views

.htaccess Rewrite Rule not rewriting alias

I am attempting to serve up a different robots.txt for alternate subdomains that I am using for domain sharding so that google doesn't index m1.example.com and m2.example.com. ...
-1
votes
1answer
130 views

Rewrite only if Image don't exists with .htaccess

How do I make RewriteCond+RewriteRule change site1.com/folder1 to site2.com/folder1, only if file in this directory don't exist. For example: site1.com/wp-content/uploads/2014/03/image.jpg If image ...
1
vote
1answer
795 views

Rewrite on root of domain only in nginx

I've got YOURLS server running to host short urls for my company, so that we can provide short URL's to our customers. I'm using nginx, and for root of the domain, if they aren't using a proper short ...
0
votes
2answers
74 views

how to redirect to https based on source IP?

I have a website running apache which is accessed internally (rfc1918 address space) as either http://hostname or http://hostname.local externally (public address space) as https://example.org. ...
0
votes
1answer
111 views

Can Nginx redirect or rewrite URLs starting with “?” without using an “if” directive?

I have an RSS feed example.com/?format=feed&amp;type=rss from an old Joomla install. The site is now built with Jekyll, and uses a new URL example.com/rss.xml for the RSS feed. Rewrite rules ...
1
vote
1answer
157 views

How to transparently redirect a user without rewriting URL when page does not exist?

I have a node web app with nginx acting as a proxy. Here's the server block for that site : server { listen 80; server_name subdomain.example.org; location / { ...
1
vote
1answer
221 views

How can I reduce the response buffer size of the reverse proxy?

I have configured some reverse proxies in order to map some HTTP audio streams that are normally accessed via different port numbers (e.g. http://fooserver:18030), to URL addresses accessible on ...
-1
votes
2answers
233 views

URL Shortener & Site Redirection on same domain

i have one domain(http://sdm.fm), And I would like it to work as a redirect to http://somdomato.com. But at the same time I would like it to work as a URL shortener. Using phURL. Like: ...
0
votes
1answer
60 views

Nginx and Wordpress: Add php after postname

I'm doing a migration from Apache to Nginx of some Wordpress sites. Now I'm dealing with the URL rewriting, because one of the blogs has the following URL structure: %postname%.php And I'm using ...
0
votes
1answer
149 views

Nginx Extract Top Directory Name From Request URI

I am in the need of being able to use top directory from the $request_uri, for example: /dir/sub/slug -> /dir I read the answer of this question: How to extract Only the file name from the request ...
1
vote
1answer
115 views

Rewrite rule for a url conatining space in its end in web.config?

I am working on a rewriting process. I have been stuck on a point that. <rule name="Uk3" stopProcessing="true"> <match ...
0
votes
0answers
236 views

How to get IIS to accept-encoding: gzip(gfe)

Google's PageSpeed Service forwards requests with the accept-encoding header set to gzip(gfe). Unfortunately IIS chokes on this with the following: HTTP/1.1 400 Bad Request Content-Type: text/html; ...
0
votes
0answers
31 views

IIS7.5 URL Rewrite generating error after importing site

I have two Windows 2008 R2 servers with IIS 7.5. One server has a website configured with URL rewrite rules. I copied the site directory to the second server and set up a new site, using this ...
1
vote
0answers
268 views

FallbackResource in subdirectory

I manage a large number of PHP applications using front controllers and the following htaccess file: FallbackResource /index.php Yes, that is the entire file (for each application)! However, a few ...
1
vote
1answer
238 views

Rewrite nginx rule for for a directory to another domain/sub domain

i have setup the following nginx rewrite rule . But doesn't seems to be working, * location /images { rewrite ^(.*)$1 http://sub.domain.com/$1 permanent; } * for images i'm trying to ...