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.
1
vote
1answer
285 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
HTACCESS cutting string Redirect 301 [duplicate]
Possible Duplicate:
Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?
1) I need to cut off the first word in the first two slashes in the url (including ...
0
votes
2answers
162 views
Apache mod_rewrite redirect with prefix
I am newbie with Apache's mod_rewrite and I'm having some difficulties getting it to do what I want.
In my static directory, I have some javascript files (.js) with 2 kind of filename:
xxxx.js ...
0
votes
2answers
317 views
why nginx rewrite post request from /login to //login?
There is a if statement, which will rewrite url when the client is Android. Everything ok.
But, something got strange.
Nginx will write post request /login to //login, even if the block of if ...
1
vote
0answers
114 views
Facing application redirection issue on nginx+tomcat
I am facing a strange issue on an application which is deployed on tomcat. Nginx is used in front of tomcat to access the application from browser. The issue is, I deployed the application on tomcat, ...
0
votes
1answer
93 views
Ignore subdomain rewrite rules
I'm having difficulty having a sub folder act differently to the main domain in my web.config for iss.
I want to prevent the sub folder from rewriting to the baselevel index.php and instead re-write ...
1
vote
0answers
91 views
Lighttpd with FastCGI configuration running ViewVC - rewrite problems
At the moment I am struggling with the configuration of lighttpd together with ViewVC. The configuration was ported from Apache 2.2.x, which is still running on the machine, serving the WebDAV/SVN ...
0
votes
0answers
24 views
Enable users to run custom-url instead of application-url using mod_rewrite or vhost on apache?
I'm running a system which users can skin/style according to their preferences.
I also want to enable users to use their custom-URL and am struggling to set this up correclty.
I have set up the ...
0
votes
1answer
142 views
Apache Proxy and Rewrite, append directory to URL
I have a backend server running on http://10.0.2.20/ from the local network, which serves similar to this:
/ (root)
|
|_user1/
| |_www/
| |_private/
|
|_user2/
|_www/
|_private/
(etc.)
...
1
vote
1answer
101 views
Nginx Part of Uri in Variable
I'd like to put a part of a URI in nginx into a Variable. Currently I've this rule.
if ( !-e /tmp/access_22092012_$cookie_PHPSESSID.tmp ) {
rewrite /folder1/folder2/(.*) ...
3
votes
1answer
95 views
Nginx: Rewriting directory path to file
I'm a little new to Nginx here so bear with me -
I want to rewrite a url like foo.bar.com/newfoo?limit=30 to foo.bar.com/newfoo.php?limit=30.
Seems pretty simple to do it something like this ...
1
vote
3answers
2k views
How rewrite a URI in nginx?
Please consider the following directory structure in my root:
/resources/css
/resources/js
/resources/templates
/resources/images
I want to serve static content from the above directories but
I ...
0
votes
1answer
79 views
DNS and URL Mapping
I have content which is hosted on serverA.com/site, however, when a user visits serverB.com/sitename, I would like it to load the content of serverA.com/site (while the url is sitll on serverB).
Is ...
1
vote
2answers
279 views
Redirect a url to another url in IIS 7.5
I have no idea why this isn't working. I've tried creating map rules and then rewritng and redirecting the url. I've tried just redirecting it with a simple rewrite rule and no matter what, the only ...
1
vote
1answer
95 views
htaccess rewrite?
i have a script that uploads images, creates a hash for it, creates 3 directories, and stores the image to
imgs/f3s/v5g/234/536_f3sv5g2344270fd093ee8a9bf8de3de32dad.jpg
(the “536_” is the user id)
...
0
votes
0answers
270 views
nginx configuration file with virtual directory
Trying to use the excellent gitlab app (https://github.com/gitlabhq/gitlabhq), which works fine when I go directly to it w/o nginx, and it also works with their provided config that serves it over ...
0
votes
1answer
54 views
mod_rewrite to a folder except for a set of domains
Could anyone help to with the following issue:
I'm trying to do a rewrite on all domains that won't match and push them to a given folder. The following vhost works locally (Mac OS X with XAMPP), but ...
1
vote
0answers
146 views
Nginx condition proxy based on the $request_body
I want my server proxy Google if my $request_body of a POSTed request contains the string google, e.g.
echo "google" | lwp-request -m POST "http://127.0.0.1"
So I have the config like, e.g.
server ...
1
vote
1answer
120 views
Universal rewrite rule for versioning css/js files?
Is there any universal rule to rewrite versions?
/css/main.123456.css rewrite to /css/main.css
/css/styles.123456.css rewrite to /css/styles.css
/js/application.123456.js rewrite to ...
2
votes
1answer
87 views
IIS re-write from http to https only for subdomains of one domain only
I have an IIS7 web server with several sites running. Some of the sites are sub-domains of one domain and the others are totally separate domains. I want to use IIS re-write to redirect all the sub ...
2
votes
1answer
423 views
nginx: [emerg] unknown “script_filename” variable
I'm receving this error when trying to use script_filename
nginx: [emerg] unknown "script_filename" variable
nginx: configuration file /etc/nginx/nginx.conf test failed
However script_filename is ...
0
votes
1answer
37 views
IIS7 URL Rewrite for URL with ’
I'm trying to redirect the following URL in IIS7 using the URL Rewrite module:
Category/Cat-3/Objectives-of-Pre-Maintenance/WHAT’S-THE-STORY-ON-LOW-CARB-DIETS-AND-EXERCISE-.aspx
but for ...
-1
votes
4answers
2k views
NGINX redirect subdomain to sub directory [closed]
I know this must have been answered a million times but I can't seem to get it to work
I would like to redirect a subdomain to a subdirectory.
I am currently using
server {
server_name ...
1
vote
2answers
120 views
Reverse Proxy Wordpress with Lighttpd
I am deploying an application and a Wordpress installation on AWS. I have Wordpress set up under Apache on an EC2, and my application under Lighttpd, and I want to reverse-proxy Wordpress through the ...
1
vote
1answer
103 views
Apache rewrite redirect to https and www
I need to get mod_rewrite to do the following
http://abc.com -> https://www.abc.com
https://abc.com/login -> https://www.abc.com/login
http://www.abc.com?x=3 -> https://www.abc.com?x=3
...
0
votes
2answers
73 views
Virtual Host vs rewrite for subdomain
Is there a best practice (for performance reasons or otherwise) for choosing between using a Virtual Host or rewrite for pointing a subdomain to a folder in the root directory?
I.e.,
www.domain.com ...
1
vote
1answer
269 views
Nginx rewrites - When does one use the break flag (pattern target break)?
The nginx wiki states:
break - completes processing of current rewrite directives and
non-rewrite processing continues within the current location block
only.
Is this to say that:
If the ...
-3
votes
3answers
85 views
RwriteRule from www.domain.net/sub to sub.domain.net [closed]
How can I create a rewrite rule which rewrites the browser url such that requests to www.domain.net/sub is always shown as sub.domain.net?
No redirection of the page is needed.
0
votes
0answers
53 views
Nginx rewrite causes duplicate urls
I am making a website where all pages will be re wrote to access php files. How can I make it so that the url http://example.com/test/ and http://example.com/example/ will rewrite to access /index.php ...
1
vote
0answers
213 views
Outbound URL rewrite IIS 7 ARR crashing application
I'm having trouble with setting up a reverse proxy outbound URL redirect in IIS 7 with ARR. The domain has 2 inbound URL rewrites and 1 outbound URL rewrite. The inbound ones work fine and I haven't ...
1
vote
0answers
317 views
only removing index.php rule works on my NginX and CodeIgniter as rewrite. Why?
Although I've spent 2 days reading on forums, I still can't get some Codeigniter rewrites working in Nginx. Here is the server configuration:
server {
listen *:80;
server_name artademy.com ...
0
votes
1answer
2k views
why i cannot download jdk from oracle web site directly without AuthParam?
that is download with the following command, why it fails to download that file?
wget http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-i586.bin
the following command works, but ...
1
vote
2answers
80 views
Redirect a directory to another subdomain
Im not familiar with apache2's rewrite engine so i need someone's help to create a rewrite rule.
Im trying to redirect this folder's and its content's url:
http://mysite.com/junk/
to
...
1
vote
0answers
121 views
vhost.conf with plesk makes infinite loop
So I'm trying to make rewrite rules for my just migrated site and now we're using PLESK (unfortunately in my opinion). So, in order to make those rewrites I'm using the vhost.conf file in ...
0
votes
1answer
70 views
Issue with Tomcat application url
At domain my.test.org I have the following setup:
A Tomcat6 running on port 8080
A redirection from port 80 to 8080 at the OS level (using NAT)
An application deployed in Tomcat at ...
1
vote
1answer
153 views
Rewrite rule for language fragments in nginx
I want to rewrite some url's in nginx and I have an wordpress site with URLs like this:
http://mydomain.com/en/my-content
How can is remove the en/ with nginx?
Thanks a lot.
Peter
0
votes
1answer
422 views
Redirect 404 errors without rewriting the URL
Is it possible to have an erroneous URL remain in the address bar while redirecting the user to a URL within my domain? I want www.domain.com/forum to be the actual site being served in all 404 ...
3
votes
1answer
324 views
How to exclude IP from htaccess domain redirect
I'm trying to write a custom redirect rule for some testing purposes on 2 domains with exactly same site. The code I am using is:
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4$
...
0
votes
3answers
115 views
How to redirect the url of old modified directories
I have a website for classifieds ads. Before I used to modify the URLs to make them more appropriate, but the old URLs are still showing up in Google index and in browser history/bookmarks.
Is there ...
0
votes
2answers
52 views
Website: Requested filename being rewritten [closed]
I have been unable to find an answer via search.
I have a website (I do not administer the servers) where the server will serve a different file than the one requested. I first noticed this when ...
0
votes
0answers
30 views
Apache - Recursion rerouting
Ok, this is some recursive thing, and I don't know how to do this in Apache.
I want this: I have some folders, let say test.web.com, website. Now this is what should happen:
1) When visiting ...
1
vote
1answer
56 views
need rewrite nginx
I'm having URLs like:
index.php?q=123&w=456&e=789
and I need to rewrite them in something like:
index/123/456/789
without using "if".
So far I've tried:
location / {
rewrite ...
1
vote
1answer
482 views
Nginx rewrite to eliminate “www” not working
I've looked at many SE threads and done various google searches and can't figure out why i can't redirect www.mysite.com to mysite.com on my nginx server.
The 1st server block does the ...
1
vote
1answer
103 views
Pretty URLs with Apache proxying [closed]
I'm running some webcams (with embedded servers) on my business network that are accessible via the web, and I want to make "pretty" URLs that Apache can route to the ports that they run on so my wife ...
0
votes
1answer
240 views
ARR w/ URL Rewrite on IIS 7 - Browser identifier incorrect
I've been able to get IIS 7 with ARR and URL rewrite to work perfectly! Now my problem is, when I go to "http://support.mydomain.com.ph" it goes to my OTRS server perfectly BUT it gives me a browser ...
0
votes
2answers
38 views
apache URL issues
I'm sure someone has asked the same question on serverfault but I just don't know what to look for.
I have two subdomains from different hosts in my school. eg.
One is: ...
0
votes
1answer
245 views
URL Rewriting on a S3 Bucket
Is there anyway at all to setup URL rewriting for a static-hosted website on S3? I'm in the process of migrating over an existing website and some of the URLs I would like for them to have a 301 ...
0
votes
1answer
120 views
htaccess to get content from another folder [closed]
I posted this question on wordpress.stackexchange.com but they said this question is a server configuration, so I reposted it here.
I'm using nextgen gallery plugin in my blog. The default folder for ...
0
votes
2answers
46 views
Migration from DotClear: rewrite urls of feeds
I've migrated my blog from DotClear2 to WP3.
I would like to add some URL rewriting on my NGinx configuration file, so that people who were following my blog using the RSS can still do the same ...
1
vote
1answer
43 views
Configuring HTACCESS in a sub directory
I have an htaccess file in my main directory which redirects all top-level directories to a PHP file.
-> /Loch would go to /profile.php?username=Loch
But I also have a subdirectory, lets call it ...