URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

2
votes
1answer
38 views

Is RewriteEngineOn used only once in httpd.conf or can it be used multiple times?

I read that a directory block in httpd.conf is like a .htaccess file. Does that mean that RewriteEngineOn can be used multiple times within httpd.conf? I'm assuming that it can be but it must be ...
0
votes
1answer
61 views

mod_rewrite proxy returns ip address instead of hostname

I've got the following setup: <Proxy balancer://clusterX> BalancerMember http://app.server:1234 </Proxy> <Proxy balancer://clusterY> BalancerMember http://app.server.2:1234 ...
1
vote
2answers
272 views

Apache2 mod_rewrite failing for non-existent sub directories [duplicate]

An even shorter version of my .htaccess file (Last RewriteCond wasn't there) use to work perfectly on my shared web hosting but I've moved to a VPS with Ubuntu 12 with it's stock Apache2 but it simply ...
0
votes
1answer
26 views

Moving my project to a different location broke absolute links

Before my project was located in the root of domain.com. Most of hrefs are like this: <a href="/user/test">test</a> But since my project was moved to domain.com/catalog/, all of those ...
0
votes
1answer
40 views

Multiple rule Apache rewrite and standard pages

In reference to: Multiple rule Apache rewrite While this works great for the multiple levels of item drill down I still have need for an admin.php page to run outside of the rule. Currently under ...
1
vote
2answers
692 views

Amazon EC2 .htaccess and 500 Error

I have an Amazon EC2 (amzn-ami-pv-2013.09.0.x86_64-ebs (ami-149f7863)) on which I installed Apache, PHP and MySQL. All works fine until I try to activate .htaccess. I change AllOverride All in ...
3
votes
1answer
57 views

Multiple rule Apache rewrite

I am trying to set up a hierarchy five levels deep with mod_rewrite. This is what I have put together at this point. It works for the last two levels (the first and second rule) but not after that. ...
0
votes
1answer
548 views

How do I redirect/rewrite to the FQDN URL without setting ServerName?

Often in intranets, users will direct URLs to a hostname without supplying the FQDN. Example: http://internalHost Instead of http://internalHost.example.com I would like to redirect users / ...
0
votes
0answers
30 views

Using an Apache rewrite map for multiple hosts? [duplicate]

I'm trying to set up a server that will be used only for mod rewrite. Most of my cases are described by a single rule that I want at the bottom of the htaccess file. I also have a few dozen ...
0
votes
1answer
62 views

Need Corrected htaccess File

I'm attempting to use a wordpress plugin called WP Fast Cache which creates static html files from all your posts, pages and categories. It creates the following directory structure inside ...
3
votes
2answers
8k views

Apache URL rewriting in reverse proxy

I'm deploying Apache in front of a Karaf-hosted application (Apache and Karaf are on separate servers). I want Apache to operate as a reverse proxy and also to hide part of the URL. The URL to get ...
1
vote
2answers
311 views

Virtual Host Configuration and mod_rewrite - Removing PHP Extension and Adding Forward Slash

On my production server, things are fine: PHP extension removal and trailing slash rules are in place in my .htaccess file. But locally, this isn't working (well, partially, anyway). I'm running ...
0
votes
2answers
1k views

ProxyPass for specific vhost with mod_rewrite

I have a web server that it set up to dynamically server different document roots for different domains <VirtualHost *:80> <IfModule mod_rewrite.c> # Stage sites :: ...
1
vote
0answers
25 views

Is it worthwhile, for performance reasons, to surround Apache mod_rewrite checks with Directives like Location, DirectoryMatch, etc?

I currently have a number of Apache rewrite rules using mod_rewrite (Apache 2.2). When I turn on rewrite logging I see a number of evaluations of rewrite conditions for files that have no chance of ...
0
votes
1answer
455 views

apache mod_proxy or mod_rewrite for hide a root of a webserver behind a path

I have 2 apache 2.2.21 one external and one internal, I need to map the internal apache behind a path in external apache, but I have some problems with absolute url. I tried these configurations: ...
5
votes
1answer
107 views

How to minimise effect of mischievous, persistent POST requests

For a few months now one of our shared hosting servers has been persistently and constantly hammered by "POST /" requests from what must be hundreds of thousands of individual IPs. On a number of ...
-4
votes
1answer
271 views

How to change .htaccess file to work right in localhost? [closed]

I have this snippet code in my .htaccess file to prevent users from hotlinking the server's images: RewriteEngine On RewriteCond %{HTTP_REFERER} ^$ [OR] RewriteCond %{HTTP_REFERER} ...
0
votes
1answer
33 views

Redirect to new domain and preserve username

I recently switched to a new domain for a version control server I run. The server is usually accessed with a username included in the url such as https://userinfo@sub.olddomain.com/some/stuff. I ...
0
votes
0answers
71 views

Third level domain and redirect

I have a domain like mydomain.com I have bought blog.mydomain.com I want that when people hit blog.mydomain.com, they get redirected to mydomain.com/blog. What I am trying is the following ...
0
votes
1answer
91 views

Apache2: Trying to map a subdomain to a subdirectory

So basically I want to have: sub.domain.com/anything -> domain.com/asub/anything I'm a bit new to this and a bit confused. The first thing I did was configure my DNS settings so sub.domain.com goes ...
0
votes
1answer
147 views

Apache .htaccess rewrite php to js and execute js file as php script

I have the folowing rewrite rule in my .htaccess file RewriteRule ^js_([A-Za-z0-9\.\_\-]{1,50})\.php$ libjs/misc/$1.js so js_messages.php url links to libjs/misc/messages.js file It's working ...
1
vote
2answers
187 views

Alias or redirect or rewrite

Roundcubemail and Owncloud folders live on the document root but because of the limitations of the Roundcube OwnCloud Plug-in I have to organise the vhosts as below. $rcmail_config['owncloud_url'] ...
0
votes
2answers
273 views

How do I configure my httpd rewrite/proxy to direct app1.example.com:443 to localhost:8080 and app2.example.com:443 to localhost:8081?

I have two Tomcat instances, one running on port 8080 and the other running on 8081. The both have deployed a web app called app.war but they are separated not only by different ports, but different ...
2
votes
2answers
298 views

Use subpath internal proxy for subdomains, but redirect external clients if they ask for that subpath?

I have a VirtualHost that I'd like to have several subdomains on. (For the sake of clarity, let's say my domain is example.com and I'm just trying to get started by making foo.example.com work, and ...
0
votes
2answers
648 views

Configure mod_wsgi WSGIScriptAlias with mod_rewrite

I want to redirect ex.com to www.ex.com but I still want www.ex.com/ to point to my app.wsgi without it showing up in the url. When I use the conf below and I go to ex.com, I get a 404 error saying ...
0
votes
1answer
207 views

htaccess rewrite condition old site to new site with querystring

I am not even going to pretend to fully understand how htaccess rewrite conditions work. I've been working on this for a while searching and searching. I have an old Wordpress site www.old-site.com ...
0
votes
0answers
522 views

Rewrite URL and keep POST data

We recently setup SVN for our web development. We'd like to be able to browse different branches/tags/trunk based on the URL you input on our dev server. So, for example, ...
0
votes
3answers
2k views

Apache > 2.2.22 rewrite rule not working?

since yesterday I'm trying to figure out how to fix the following: running phpipam (http://www.phpipam.net/) with WAMP (Windows environment). The problem I am facing is related with RewriteRule ...
1
vote
2answers
215 views

Server remembering old rewrite rules, even when I remove htaccess

I have set up a development server with Ubuntu and LAMP, but for some reason the .htaccess is acting strange... There is a site on there with a set of rules, when I comment them out they still work, ...
0
votes
1answer
141 views

Trouble configuring virtual host to allow standard wordpress mod_rewrite for permalinks

I'm having a little trouble getting the standard mod_rewrite that wordpress generates in my directorys .htaccess file to work correctly. The server I'm using has a virtual host set up on it by ...
2
votes
2answers
2k views

Request exceeded the limit of 10 internal redirects

so here is the error [Mon Sep 30 00:09:53 2013] [error] [client 66.249.66.205] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' ...
0
votes
3answers
273 views

Mod Rewrite appends Document root in rewrite rules

Previously my host provider gave an option of setting up rewrite rules in apache configuration files. At that time below rule worked fine. # Non WWW URLs to WWW URLs RewriteCond %{HTTP_HOST} ...
0
votes
1answer
70 views

Apache Hotlink Prevention not Working

I have been trying to prevent hotlinking of images on a domain of mine without any success. I have added the following to /etc/apache2/httpd.conf RewriteEngine On RewriteCond %{HTTP_REFERER} !^$ ...
0
votes
1answer
152 views

Jetty Rewrite NoSuchMethodException

I tried to configure jetty rewrite rules. I used code from the example here: http://www.eclipse.org/jetty/documentation/current/jetty-handlers.html#d0e10798 but when I try to run it I get: 2013-09-29 ...
-1
votes
1answer
86 views

Nginx redirect sub.domain.com/users/page/somename to somename.sub.domain.com

I've been trying to redirect http://sub.domain.com/users/page/somename to http://somename.sub.domain.com etc. Any pointers?
0
votes
1answer
121 views

Apache - Return 404 for all execept selected

I am seeking for method to prevent access to Wordpress admin folder "wp-admin", but also i need apache to generate 404 error (Not found) for all, but not selected IPs. I found this post Returning 404 ...
1
vote
1answer
191 views

htaccess RewriteRule force end of execution Apache 2.2

Hi I have written some rewrites, but from what I can tell from the logs it seems that the rules keep executing and so, although the correct result is achieved mid-execution, the final rewrite is ...
0
votes
1answer
1k views

RewriteBase rule works in .htacess, but not in httpd.conf (inside <Directory …>)?

Let me explain by example... File: /var/www/example.com/public/wp-content/cache/minify/.htaccess <IfModule mod_rewrite.c> # THIS WORKS... RewriteBase /wp-content/cache/minify/ ...
0
votes
1answer
59 views

htaccess rules unexpectedly forcing download of gzipped index.html [duplicate]

I'm trying to set up SSL on a Wordpress site. The SSL certificate does not cover both www. and non-www. versions of the URL, so I'm trying to simply redirect everything to https://domain.tld with ...
-3
votes
2answers
261 views

Mod Rewrite code with out changing the url in address bar

I When I call http://www.mysite.in/abc/xyz it shoud show up http://www.mysite.in/abc/xyz/index.php but the url shout not change in address bar and it should work with out "/" in the address. Please ...
-1
votes
2answers
76 views

Website link with out “/” [duplicate]

My Apache 2.2 is running on port "8080" I want to call my site url http://www.example.in:8080/abc/xyz.html/index.php (xyz.html is a folder) as .... http://www.example.in:8080/abc/xyz.html Can ...
0
votes
1answer
239 views

How to rewrite /index.php to /app.php [duplicate]

I have this in my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteEngine On ...
-1
votes
1answer
29 views

redirect / to /?C=N;O=A [duplicate]

I want to be able to use IndexOrderDefault Descending Date for all of my sub-folders, but I want to the first page to be sorted by name (A-Z) I read ...
0
votes
2answers
584 views

LDAP Auth proxy adding headers according to LDAP groups

I'm trying to setup some WebSSO mechanisms, that allow my customer to authenticate people against internal Active Directory and then add secure (https) headers containing credential information. ...
0
votes
2answers
832 views

How to change NGINX server name

In the Apache web server we can change the server signature (Apache Name) using mod_rewrite. For example - ...
0
votes
1answer
120 views

redirect a directory to a new domain without touching the main website

I would like to redirect https://mineyourmind.de/forum to https://mineyourmind.net/forum . Every rewrite rule I could google didn´t work, they also redirected the main domain (mineyourmind.de). Im ...
-1
votes
1answer
197 views

You don't have permission to access /on this server

I created a form in joomla with 2000 fields but when I submit the form it gives me: error-- You don't have permission to access /en/soccer-player-update on this server. Additionally, a 404 Not Found ...
0
votes
1answer
556 views

Apache mod_rewrite: how to handle slash in URL?

I have a following URL structure: http://mysite.com/movies/index.php?id=123 I want to get rid of index.php?id=123 and instead use the following URL: http://mysite.com/movies/123 I came up with ...
0
votes
1answer
120 views

Are there security concerns when using Apache's mod_proxy as a gateway?

In order to cope with same-origins policy for AJAX calls I want to allow for mod_rewrite and mod_proxy to handle these calls in a similar way as described in another answer: rewriteEngine on ...
0
votes
0answers
73 views

How do you exlcude a sub-directory from an Apache rewrite ruleset?

I have a multilingual site with the root being English and a sub-directory (/es/) being a human translation into Spanish. Instead of manually updating all URLs, I have a opted to use mod_rewrite to ...