URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
26 views

mod_rewrite map doesn't work

I am trying to build a simple mod_rewrite map to have category names translated into ids like so: ../category/electronics -> category.php?cat=1 The map is placed inside the www folder. The code ...
0
votes
0answers
59 views

Apache error log not showing full path of 404 failures

If I have a working path like /gallery/landscapes and I try to access this inexistent url: /gallery/landscapes/whatever I see the 404 error in my browser but the apache log says that I had an ...
1
vote
1answer
32 views

Can Apache's URL redirection send a request to both original URL and rewritten URL?

I would like to use Apache's URL redirection to match a URL and forward it's request to another URL. Simple enough, I know. But, I'd like the originally requested URL to continue to be called in ...
0
votes
0answers
34 views

How to exclude a URL from mod-rewrite with nginx?

I'm moving my Joomla! 2.5 from Apache Ubuntu to Debian nginx and I need to exclude some URLs from the mod-rewrite. Now I'm rewrite all within this directive on the IspConfig panel: # mod_rewrite url ...
0
votes
1answer
217 views

Apache/2.4.6 update causes 404s

I'm running a ec2 ubuntu instance, I decided to update my PHP today to 5.5.7, unfortunately it triggered apache to update as well, which has caused me many errors, the biggest one is my rewrite rules ...
0
votes
1answer
30 views

Redirect all pages to one page on same domain

I have this htaccess rule RewriteCond %{REMOTE_ADDR} ^xxx\.xxx\.xxx\.xxx RewriteCond %{REQUEST_URI} !/path/to/file.php$ RewriteRule $ /path/to/file.php [R=302,L] and the purpose to is redirect a ...
0
votes
1answer
31 views

Apache rewrite: Strip out url part [duplicate]

I have a Ruby on Rails app with two sub-sites, www.example.com/site1 and www.example.com/site2. For demonstration purpose, we need to disable site2 and only show site1. So I made some redirects in my ...
0
votes
1answer
40 views

Redirect to default image when file is not found

From an iOS app I upload small avatars of Apple Game Center users to a web server, into an /ios-avatars/ dir. But some players do not have any pictures. By using Apache mod_rewrite is it please ...
0
votes
0answers
70 views

redirection in Apache include current ServerPort

For long time I am using Apache instalation which doing automated redirect with mod_rewrite (mainly root redirected to specific app and from HTTP to HTTPS but also other). There are could be severeal ...
0
votes
1answer
24 views

Rewrite a directory to another directory without a redirect [duplicate]

I have the following rewrite rule: RewriteRule ^support/(.*)$ /blog/support/$1 [R=301,NC,L] However, all it does is a simple redirect. What I want to is for /support to show the contents of ...
1
vote
1answer
26 views

Rewrite rule when source contains a '?' [duplicate]

Scratching my head on this. I have an old URL: http://myserver/blog/archive?openview&type=Category&key=Demo and a new URL http://myserver/blog/categories/Demo I'm trying to get ...
0
votes
0answers
32 views

Making changes in Loglevel httpd.conf of apache server?

I am working on windows-7 Visual studio 2008,According to Apache: Configure "LogLevel debug" for certain modules only? i am making changes in the loglevel of configuration file I am giving ...
0
votes
0answers
36 views

apache put input value on request header [duplicate]

What I need to do is put the groupID on to request header before forwarding the page to the http://otherServer/app which expects the groupID to be on the request header and userID to be on parameters. ...
1
vote
2answers
55 views

How to use mod_rewrite to abstract get request with subdomains

I've been at this all day and I thought I had a handle on regular expressions but I'm no longer confident that I do. I've searched all over, read through some horrible guides on mod_rewrite and I'm ...
1
vote
4answers
86 views

HTTPS / HTTP mod_rewrite rules, strange interaction with subsequent CMS index.php rewrite

With the below rewrites in htaccess, as expected, this HTTPS request is not rewritten: https://example.com/system/anything is not re-written to http://example.com/system/anything But, ...
0
votes
1answer
42 views

apache mod_rewrite not working with mod proxy

I have a Rails 2.3.18 application running on http://0.0.0.0:3004/, it is running with Passenger module, and is deploying on Apache server with proxy module using the following configuration: ...
2
votes
1answer
27 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
36 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
69 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
22 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
32 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 ...
0
votes
0answers
71 views

Conditional reverse proxy in apache

I'm using Apache 2.2.25 as a reverse proxy for two diferent servers, using two diferent URLs. So basically the URL http://www.mydomain.com/path1 will be reversed-proxied to server1 (weblogic) ...
1
vote
2answers
120 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 ...
0
votes
0answers
22 views

Apache 2 rewrite rule expression [duplicate]

I need to make a rewrite rule in an intranet Apache2 (CentOS 6.4) Server. I need to redirect (servername)/(path) to (servername).(domain)/(path) OR (serverIP)/(path) to ...
3
votes
1answer
54 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
241 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 / ...
1
vote
0answers
26 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
53 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 ...
1
vote
2answers
354 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
142 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
243 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
19 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
169 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
85 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
82 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
28 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
40 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
42 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
36 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
85 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
178 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
163 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
78 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
48 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
87 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
2answers
557 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 ...
0
votes
0answers
93 views

access restriction using http_referer in nginx

access restriction in nginx URL: http://test.example.com/pentaho/reporting/reportviewer/report.html?solution=steel-wheels........... I will call the above URL from ...
0
votes
0answers
39 views

How can I make this SSL rewrite work?

We have two domains. Both have valid SSL certs. But we are moving towards a more "unified" domain scheme. For example, our domains are like: https://apps.example.com/webapp1 ...
0
votes
1answer
60 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
70 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 ...