URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

1
vote
0answers
394 views

Apache configuration for silent rewrite of query strings like codeigniter

Codeigniter rewrites query strings like the following: http://somedomain.com/index.php?q=something to become: http://somedomain.com/index.php/q/something I'd like to imitate this behavior on a (...
1
vote
0answers
1k views

Cakephp CSS file not loading

I have a website working on one server. I am changing hosting, so I created a website on another server for testing. Everything seems to be working, except CSS. It is not loading at all. I have 777 ...
1
vote
0answers
403 views

Why firefox handle urlencode differently with apache mod-rewrite B flag?

Recently I have encontered a strange problem about urlencode, I happened to have a "+" in my both pathinfo and querystring parts of the url. For exampele: http://example.com/A + B?s=C + D I use ...
1
vote
0answers
136 views

rewrite HTTP verbs

I have a REST api that is invoked by a Javascript Web application. HTML/CSS and JS files are stored locally and served by Apache, and the REST api is invoked with a ProxyPass directive by Apache on a ...
1
vote
0answers
269 views

nested drupal site clean urls

I have a main drupal7 site and a drupal6 site that "lives" within the main drupal7 site. The urls look like this: example_d7.com and example_d7.com/dir/example_d6. Each of these sites are served out ...
1
vote
0answers
239 views

Apache mod_proxy site alias, alternative domains

Guys! Having a problem with apache mod_proxy, hoping someone can help Preface: We need a new domain (http://section1.info) to direct users to (http://domain.info/?q=section1) and maintain section1....
0
votes
0answers
11 views

How to send all HTTP error codes dynamically to one PHP file when access to all other files is denied?

I'm having the following situation, I'm developing an API. I rewrite all traffic to one PHP script named: api_route.php, using mod_rewrite like: 1: RewriteEngine On 2: RewriteCond %{REQUEST_FILENAME} ...
0
votes
0answers
16 views

to set RequestHeader in apache httpd server is not working

I have a requirement, where I need to set the RequestHeader with a value retrieved from the querystring of the URI. Approach adopted is to write the RewriteCond and ReWriteRule where the condition ...
0
votes
0answers
6 views

OpenCart SEO isn't functioning even with SEO Button Enabled and htaccess configured

I have opencart installed with ubuntu 14.04, my apache config file is: <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName example.com ServerAlias www.example....
0
votes
0answers
14 views

Move 2 subdomains without breaking links to themselves

Assume www.example.com contains two sub-domains, each with a different site, such that www.example.com/sub1 and www.example.com/sub2 are not related to each other. I want to move/rename sub1, but I ...
0
votes
0answers
8 views

htaccess on subdomain & query string

I have the following htaccess RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} ^(.*).domain\.com RewriteRule ^(.*)$ index-merchant.php?id=%1 [NC,QSA] It can capture $_GET['...
0
votes
0answers
54 views

Tomcat/apache2 application - virtual host issue. Welcome.action URL not found. Possible mod_rewrite issue

Im having some issues setting up a tomcat application to work with apache2. My KonaKart tomcat application is running on port 8783. And I'm trying to access it publicly on port 443. I created the ...
0
votes
0answers
28 views

Rewrite URI so all occurrences that match strings is rewrited

I'm new to regex and I'm trying to write a rewrite query, but without results. So I hope some one can help me to solve this. So my rewrite rule looks following: RewriteCond %{QUERY_STRING} ^(.*)...
0
votes
0answers
31 views

Running Rails apps on subdomain with Apache and mod_rewrite WITHOUT VirtualHost

I am host a number of domains on Apache (Ubuntu). I am not using VirtualHost for all the domains, I am using mod_rewrite (and a custom RewriteMap to boot) to map domains and subdomains to a variety ...
0
votes
0answers
10 views

apache proxypass depending on querystring

I have two apps listening on ports :8085 and :8888 respectively. I am trying to serve either of the two apps depending on the presence of a querystring. My httpd-vhost looks like RewriteEngine On ...
0
votes
0answers
34 views

Apache Rewrite and ProxyPass

I got a little problem with my apache configuration at the moment Got a Vhost like this: <VirtualHost *:80> ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9001/www/$1 ...
0
votes
0answers
65 views

rewrite works in htaccess but not in apache2.conf

I am trying to move rewrite rules from .htaccess to apache2.conf (at Kubuntu to use The Bug Genie software). Rewrite rules in .htaccess works fine, but after moving (and adjusting) it to apache2.conf ...
0
votes
0answers
33 views

Issue with mod_rewrite L flag

I'm having problems with the L flag - it's not working as I think it should. Please take a look at the following code: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^...
0
votes
0answers
14 views

Apache RewriteRule with Proxy and Changing Content-Type

We are currently using mod_proxy to proxy to proxy to the correct destination with the following line: ProxyPass /my-path balancer://server/path/to/real/thing However, a third party is sending us ...
0
votes
0answers
83 views

Apache htaccess config not working after upgrading from 2.2 to 2.4

Our document root is /var/www/foo.com/ and in /var/www/foo.com/lodging/ I have this .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /lodging/ # redirect base lookups to wp cms (...
0
votes
0answers
33 views

expire 401 or redirect it apache proxy

I'm not sure if this is something handled in OIDC or apache in general but what I'm seeing is this and was hoping for some advice: A customer is logged into multiple Google accounts and at the ...
0
votes
0answers
17 views

Apache proxy request from mod_rewrite gets messed up by NGINX reverse proxy

I have several websites and I am transitioning from using perlbal as my reverse proxy, to using nginx as my reverse proxy. Things are mostly moving along OK, and I even got SSL to work very nicely. ...
0
votes
0answers
31 views

Rewrite Query String to Display as Subdomain in Browser?

I have search every possible resource however, I have not been able to find the help i need so i thought i would ask here. I am not highly educated in .htaccess rewrites so please bare with me if i ...
0
votes
0answers
40 views

Htaccess redirect to https and www using a single RewriteRule

I have the following in my .htaccess file: RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule .* https://www.%{HTTP_HOST}...
0
votes
0answers
11 views

Most compact and speedy mod_write map?

I am storing a list of paths in a mod_rewrite map. With 4MB and 120000 entries, it seems prudent to use a RewriteMap with a dbm format, instead of a plain text file. Apache seems to support multiple ...
0
votes
0answers
24 views

RewriteCond fails on existing file

So, my .htaccess file starts with: Options -MultiViews RewriteEngine on RewriteBase / And I tried: RewriteCond %{REQUEST_FILENAME} -f or RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f or ...
0
votes
0answers
106 views

Fix ERR_TOO_MANY_REDIRECTS after adding trailing slash in URL

I have a Magento website hosted in a managed server where we need to use two .htaccess files, the first one is needed to redirect all request to a subfolder /current/src/ and is placed directly in ...
0
votes
0answers
19 views

Apache rewrite rules in both config and .htaccess

I have a CakePHP application hosted in a virtual host (Apache 2.4) which works OK. Now in the internal network where the virtual host name cannot be routed so I have to use the web server IP. And ...
0
votes
0answers
68 views

Backreferencing a cookie value in rewriterule

I'm trying to backreference a cookie's value in a RewriteRule : # Trace rewrite rules log LogLevel alert rewrite:trace4 # Rewriting the URL, in the cookie's condition i've tried en alone, and en|fl|...
0
votes
0answers
38 views

How to block referral source on apache with special characters?

I've been getting referral spam on my site. I've tried several options to block it, but it still hits it. I think it has to do with being special characters on the referral? This is the referral ...
0
votes
0answers
22 views

Apache redirect to https from multiple domains

I have a virtualhost with multiple domains that point to it (servername and alias). I find a solution to redirect every domain to https:/ /example1.com and works fine. But now, i want to redirect also ...
0
votes
0answers
41 views

mod_rewrite index.php behind varnish server

I have on my pfSense router a Varnish server currently with 4 backends. 3 of the backends go to the same server on my network and the 4th goes to my development server I'm using to get some webapps ...
0
votes
0answers
158 views

Can Tomcat 8 Rewrite Valve be used to forward access to specific ports?

I have a server (server.mycompany.com) which have (among others) several java applications running in tomcat containers, each on it's own port. On port 80 is an Atlassian Confluence wiki, installed in ...
0
votes
0answers
32 views

Apache - how to match against a variable within regex?

Trying to match a variable against another in a directive does not work: RewriteCond %{REQUEST_URI} /absolute/path/%{REMOTE_USER}/ Trying the If directive in Apache 2.4 doesn't work either: <If ...
0
votes
0answers
27 views

RewriteRule — how to serve file from subdirectory, but show requested URL using only .htaccess

I want to be able to switch between dev/live subdirectories without altering the URL that displays in the browser and without having to modify httpd.conf. I want https://domain.com to actually serve ...
0
votes
0answers
26 views

problematic htaccess remapping of old domain urls to custom pages on new domain

I am remapping a bunch of urls from old domains to custom pages on the new domain, and a handful of rewrites for old urls don't seem to be applying. These are the rules i have now for the domain ...
0
votes
0answers
59 views

mod_rewrite hide URL params

I have the following URL: www.mydomain.com/musician.php?musician=musicianname&id=idnumber I am using mod_rewrite to achieve this: www.mydomain.com/musician/musicianname/idnumber This is the rule ...
0
votes
0answers
10 views

Weird request, trying to correct with rewrite rule

I've got some really weird requests coming into the site. We've tried replicating in all browsers, mobile, tablets, etc etc... but still can't figure it out! As an intermediary, we are trying to force ...
0
votes
0answers
54 views

How to get a useful error about failed .htaccess redirects?

I am trying to set up a test server on localhost for a LAMP app that's already live, in order to allow my team to write and test some new features. On a vanilla installation of Fedora 22, I have ...
0
votes
0answers
12 views

Apache RevProxy and Webapp with subfolders

I would like to extend my current RevProxy. By a subfolder (www.example.com/subfolder) I would like to make an small webapp available. Here is my configuration from RevProxy: ProxyPreserveHost ...
0
votes
0answers
76 views

Apache reverse proxy rewrite failing to mask internal URL

I am having an issue setting up a Reverse proxy scenario to an internal URL authentication service. Using Apache I have setup the below - ProxyPass "/mqa/login/" "https://internal.com:8880/...
0
votes
0answers
148 views

Prerender with my angular application

ive asked this question on Stackoverflow and got suggested to try here so i am hoping some of you can help: I have followed the following guide: In angular: $locationProvider.html5Mode(true); In ...
0
votes
0answers
73 views

forward slash and mod_rewrite

This might be a stupid question but it took me days to even figure out what the problem was. I'm using mod_rewrite and passing values separated by forward slashes. The problem is that the forward ...
0
votes
0answers
27 views

Redirect from different domains on SSL without URL rewriting

Problem I have two domains hosted on hostgator (on different servers): Domain A is using cloudflare for DNS and flex SSL. This is hosting a product page with info about product. Domain B is using ...
0
votes
0answers
104 views

Apache 2.4 mod_rewrite on vhost_alias

i have configured apache as dynamic mass virtual hosts. I have serval applications writen in symfony2 with .htaccess Vhost looks like this: <VirtualHost _default_:80> ServerAdmin d.jamka@the....
0
votes
0answers
64 views

Combine modrewrite condition to avoid double redirects

There are two modrewrite directives in my htaccess file. One is redirecting uppercase URLs into lowercase. The other one is redirecting http and www requests to https and none www. #Redirects ...
0
votes
0answers
81 views

Set 1 cookie on 2 different subdomains

I am trying to get one cookie to work with 2 domains. Currently using an agreement page once a users first views the website that it will come up and they have to accept the ToS to continue, however ...
0
votes
0answers
308 views

Apache Allow Override Not Working with Docker Container

To sum it up; I can't get httpd.conf AllowOverride to work inside a CentOS:6.6 Docker Container. It completely hides the alias directory to any browser. I know it is not permissions and it is not ...
0
votes
0answers
78 views

Problems loading CSS. Error.log prints: “Request exceeded the limit of 10 internal redirects”

I have issues on my server. When I do changes to CSS file they are not showed until one day later or more. I have seen the following error in the apache error.log: [Thu Jul 16 08:48:49.193132 2015] [...
0
votes
0answers
118 views

Apache redirection to domain (both Http and https)

I'm trying to redirect some urls in http and https to a new subdomain. For example: http://myurl.com/one/two/three -> http://newsubdomain.myurl.com/one/two/three https://myurl.com/one/two/three -&...