URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
52 views

Redirect domain/directory to domain2/directory

I would like domain1.com/customers to go to domain2 my home directory public html's folder / customers. Both domains are on different servers. In the folder on the second server/second domain we will ...
0
votes
0answers
91 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
2answers
50 views

Subdomain-to-folder redirect (HTTPS)

I have the following in my httpd.conf at the very bottom. No other configuration is done. NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@contoso.com ServerName ...
1
vote
2answers
60 views

Lighttpd rewrite subdomains to subfolders

I have a server (itself on a subdomain) with wildcard DNS pointing to it. The server is running Lighttpd and PHP. I need requests to http://any-subdomain.server.example.com to rewrite to ...
0
votes
1answer
33 views

Masking external domain with Apache2 [closed]

Let say, that you own domain www.example.com and have another project on another domain on server that you do not have control: www.sub.notmine.example.org. And you want an user do navigate to ...
0
votes
1answer
41 views

rewrite rule does not rewrite url as expected

I have a problem with a CMS website, that normally generates readable urls. Sometimes it happens that navigation links are shown as www.domain.com/22, which results in an error, instead of ...
-2
votes
1answer
80 views

How to redirect using Apache [closed]

I am working on moving an IIS server website onto an AWS Load balancer. I am trying to figure out how to Manipulate a web link in Apache. My team and I are currently using IIRF to redirect the link in ...
0
votes
2answers
130 views

A RewriteRule for all VirtualHosts on Ubuntu 14.04?

After a2enmod rewrite, I wrote the file /etc/apache2/conf-available/myspecific_rewrite.conf : RewriteEngine on RewriteRule ^/test(/.*)?$ http://anothersite.tld/test$1 [R] RewriteRule ^/test2(/.*)?$ ...
1
vote
2answers
166 views

Apache httpd mod_rewrite with Tomcat resulting in lost JSESSIONID

So I'm working on a Java web application, for which I recently implemented an authentication module that relies on the JSESSIONID cookie to identify users. I was testing on a local tomcat from eclipse ...
0
votes
0answers
15 views

htaccess negation rule not being followed

I'm working on a wordpress blog. The .htaccess file for it includes this block: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond ...
0
votes
0answers
20 views

redirect robots.txt to alternative apache mod rewrite [duplicate]

I'm having trouble trying to get an alternative robots.txt to display for different host names so that Google or Bing won't spider different addresses. Here's what I have so far #temporary dev rule ...
0
votes
1answer
52 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
19 views

ProxyPassReverse from unique path and HTTP_HOST

This is probably super simple and something I overlooked (or totally misunderstand). Trying to redirect all incoming traffic for a certain path to one of my other servers (I put the wrong environment ...
0
votes
0answers
52 views

Changing the current URL but serving content from another (same domain) - ProxyPass?

I've been banging my head against the wall with this for months now so I hope someone on here will be able to finally advise what is needed for this. I have some URL's like this:- ...
0
votes
1answer
19 views

Apache Windows MOD_REWRITE &

One of our clients is using Apache 2.2 as a reverse proxy server (Yes, stupid of them) and we're seeing some very funky behavior when trying to redirect some URLs and I'm curious if anyone has seen ...
0
votes
0answers
61 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 ...
1
vote
3answers
62 views

mod_rewrite all but two files causing loop

I'm trying to set up a web site to allow the creation of a semaphore file to close the site. The logic I want to follow is: when the semaphore file exists and the request is not for /style.css or ...
0
votes
0answers
222 views

Reverse proxy 502 bad gateway

I have setup a subdomain to proxy my plesk panel, but when saving pages I am getting 502 Bad Gateway error instead of a completion message. I am running CentOS 6. Here is my vhost.conf configuration ...
0
votes
0answers
16 views

How to write an apache rewrite rule from /?param=1&param=2 to /index.php?param=1&param=2 [duplicate]

I am trying to figure that out but my regex experience is non-existent and apache rewrite rule is intimidating. Can anyone shed a light?
0
votes
0answers
101 views

apache2 on cloud 9 : could not read /etc/apache2/envvars

I'm trying to get a Laravel app up in the new cloud9 beta, and hopefully the last step I need is to get mod rewrite working. I looked up how to do it and so I've been trying: sudo a2enmod rewrite ...
0
votes
1answer
52 views

VirtualHost Redirect should work with new RewriteBase

Inside the VirtualHost I got this redirect: RewriteBase / RewriteCond %{REQUEST_URI} wp-content/uploads/([^.]+\.(jpe?g|gif|bmp|png))$ RewriteRule (.*) http://example.org/$1 [R=301,L,NC] So the full ...
0
votes
0answers
41 views

WAMP, Vhosts and mod_rewrite not all playing nicely together

I have a client using a Windows 2012 server with WAMP installed. We use PHP 5.4 with mod_rewrite for SEO friendly URLs. All was working well with them until we tried to enable vhosts to set up a ...
0
votes
1answer
86 views

Apache mod_rewrite redirecting to base URL

I'm busy migrating a production codeigniter project to a new server. The current setup has been working fine for almost a year now but while moving to the new LAMP stack I'm running into a weird ...
0
votes
2answers
105 views

Mod_Rewrite Error code: ERR_TOO_MANY_REDIRECTS

I know alot people have post about this error , however i still unable to solve it.So that is the reason why i start a new post with it. As stated in the title , i encounter a redirect loop when ...
0
votes
1answer
30 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
72 views

apache reverse proxy 404 image error

I have some error with my apache reverse proxy. Currently I am doing reverse proxy to 4 websites. 1.1.1.1/a 1.1.1.2/b 1.1.1.3/c 1.1.1.4/d I am having no problem when reverse proxy to a and b ...
0
votes
0answers
134 views

CakePHP Rewrite Loop using Subdomain Wildcards

I am using CakePHP 2.4 and usually setup a single virtualhost file to point to dev.myapp.com and everything works fine. dev.myapp.com goes to the home page, and dev.myapp.com/users goes to the main ...
1
vote
1answer
227 views

Apache2 mod_rewrite Clean URL - working, but files not accessible

Server: Debian Jessie Apache: 2.4.9-1 PHP: 5.5 What I want is all non-files and non-directories to redirect to index.php where I handle them myself. Due to the nature of my project I must work from ...
0
votes
2answers
319 views

How to pass arguments through ProxyPass in Apache

What I'm trying to do and I've got stuck is: I've got apache server that will catch certain url's and for some of them, he will use ProxyPass (or mod_rewrite) to pass something as reverse proxy to ...
1
vote
2answers
66 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 ...
0
votes
1answer
36 views

Using mod_rewrite rules in global server config

The Problem I'm attempting to make a mod_rewrite rule in Apache's global server configuration, and have it take effect for all Virtual Hosts. The documentation certainly indicates this is perfectly ...
0
votes
1answer
123 views

htaccess redirect HTTP & HTTPS non-www to HTTPS www

How can I redirect my website from all HTTP requests to HTTPS + non-www HTTPS to HTTPS with www.? Example: Redirect HTTP non-www, HTTP www. & HTTPS non-www: HTTP:// example.com/ && ...
0
votes
1answer
40 views

How to change image folders and domain with mod_rewrite?

I have images like this - http://www.site1.com/upload/long/long/long/long-path/image.jpg I need redirect all images in folder upload to another site and strip path. Example ...
0
votes
1answer
35 views

Why does this rewrite rule require *.*

I want to redirect requests for any images with filenames starting with a string like 'myimage_' to a subdirectory on another server. I'd like to understand why the following rule does not work for my ...
0
votes
1answer
46 views

Forwarding original URI within mod_rewrite

I'm trying to use mod_rewrite and somehow forward - preferably via a header - the original URI to my application server. What I'm really sticking up on is how to get the information I send to carry ...
0
votes
1answer
283 views

Dynamicly reverse proxy a subfolder to subdomain in Apache

I would like to dynamically proxy sub folders to sub domains on another host. For example, I have the following reverse proxy setup for a single sub folder to sub domain: ProxyRequests Off ...
2
votes
2answers
50 views

Redirect to SSL without malforming GET arguments

I added this to .htaccess to redirect HTTP to HTTPS: RewriteEngine On RewriteCond %{HTTP:X-Forwarded-SSL} !on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] It works, but it ...
-1
votes
1answer
44 views

Mod rewrite htaccess worked on old server, not on new server

I have the following .htaccess file, which worked fine on my old host. I moved over to an AWS instance (Ubuntu 12.04 LTS), and it's no longer completely working: <IfModule mod_rewrite.c> ...
1
vote
2answers
45 views

Trying to understand this set of Apache2 Rewrite Rules

I have the following Apache2 Rewrite rules and I am trying to decipher the meaning behind them: 1. RewriteEngine on 2. RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4 3. RewriteCond %{REQUEST_URI} ...
0
votes
0answers
203 views

URL Obfuscation: How to securely hide backend urls with nginx or apache?

Simply put: How can I obfuscate a url? Much like whats in this post but I need to have security also in mind. Lets say I have a url endpoint: ...
1
vote
1answer
54 views

Amazon Web Services: Managing Public DNS and Elastic IP Content Duplications with mod_rewrite

I'm currently addressing content duplication issues of my AWS website for SEO purposes. More specifically I am trying to implement re-write rules for the duplicate addresses: Public DNS ...
0
votes
0answers
53 views

.htpasswd allow one URL with RewriteEngine = on

I'm trying to get exception from auth (.htpasswd ) for one specific URL, but seems, that it does not work with my Rewriting rules. Disabling RewriteEngine solving auth problem. My .htaccess: SetEnv ...
1
vote
2answers
447 views

Apache Redirect To Another Server with subdomain

I am currently running CentOS which hosts my web and gitlab server and a windows machine that is hosting a subsonic server. Currently, my ip points to the CentOS but does not redirect correctly. I am ...
1
vote
1answer
63 views

apache change proxy request url rewrite

I have problem with proxy requests. I need to enable apache mod_proxy for my subdomains but i forgot to set Allow from mydomain.com, it was Allow from all...Yes, i created open proxy for all world... ...
0
votes
1answer
51 views

Apache mod_rewrite - why friendly URL doesn't works with static files?

My configuration to use friendly URL works fine when the destination is a php script, like this: RewriteRule ^products/([a-z0-9-]+)/([0-9]+)/?$ /prod.php?id=$2&name=$1 [NC] But, when I use a ...
0
votes
4answers
100 views

Modrewrite phpmyadmin to HTTPS

I'm using this to force access to phpmyadmin onto HTTPS but it's staying on HTTP, other directives in the .htaccess file of the site work fine. RewriteEngine On RewriteCond %{SERVER_PORT} 80 ...
-1
votes
1answer
140 views

mod_rewrite: Redirect https://example.com to https://sub.example.com [duplicate]

I have an domain example.com running on an Apache Server and I want to redirect every call to https://example.com to https://sub.example.com. I have a Virtual Host configured like this: ...
-2
votes
1answer
50 views

Apache mod_rewrite with content moved to different subdomain [duplicate]

I have a url xyz.example.com for which contents were moved to abc.example.com. I know this can be redirected using mod_rewrite and had moved too, but when accessing xyz.example.com, in user's browser ...
0
votes
0answers
61 views

I got “Request exceeded the limit of 10 internal redirects”?

I have a rewrite RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^(.*).club.domain.net$ RewriteRule ^(.*) %{HTTP_HOST}$1 [C] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
-1
votes
1answer
37 views

apache disable unconfigured subdomains [duplicate]

There is a webserver which has example.com, www.example.com, my.example.com, shop.example.com, static.example.com. All sites except www.example.com is on https. My problem is when I type ...