2
votes
1answer
29 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 ...
1
vote
2answers
257 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 ...
1
vote
2answers
505 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' ...
-1
votes
1answer
39 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} !^$ ...
1
vote
1answer
88 views

How to store value of a non-standard HTTP request header to be used in an Apache If conditional

My server will be receiving a non-standard HTTP request named EmployeeID that I want to use to determine access rights to certain directories on the server. How can I store the value of the incoming ...
1
vote
0answers
30 views

Rewrite not functioning in httpd.conf

My httpd.conf has: <Directory "/var/www/site"> AllowOverride All RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^site.com [NC] RewriteRule ^(.*)$ ...
0
votes
1answer
742 views

Configuring httpd.conf to handle wildcard domains with *multiple* scripts

I have a full-blown site like: http://www.example.com (uses index.php) http://www.example.com/scriptA.php http://www.example.com/scriptB.php I now want to have the possibility of setting up ...
3
votes
1answer
288 views

Is it possible to rewrite some query strings to HTTPS and keep everything else on HTTP?

I'm rewriting query strings to pretty URIs, example: index.php?q=/en/contact becomes /en/contact and all works nicely.. # httpd.conf # HANDLE THE QUERY RewriteCond %{REQUEST_FILENAME} !-f ...
1
vote
1answer
358 views

mod_rewrite in .htaccess causes header not to be applied - why?

Excerpt from <VirtualHost *:80> section in httpd.conf (goal: set Cache-Control for all JavaScript files): <LocationMatch "\.js"> Header set Cache-Control "max-age=290304000, public" ...
4
votes
1answer
2k views

how to rewrite '%25' in url

My website software replaces space characters with '+' characters in the URL, A proper link would look like 'http://www.schirmacher.de/display/INFO/How+to+reattach+a+disk+to+XenServer' for example. ...
0
votes
4answers
72 views

mod_rewrite redirects to www.example.com// when trying to access example.com

I have a VPS on which I'm trying to setup multiple websites. For one of them, with the current set of rules (below), accessing hxxp://example.com sends me to hxxp://www.example.com// [note the ...
2
votes
1answer
2k views

Why is the RewriteBase not working?

Here is what I am trying to do: domain is thinkingmonkey.me domain has 127.0.0.1 as IP addr mod_alias is installed. I have a conf file called directories.conf. In which I have all the ...
0
votes
2answers
81 views

mod_rewrite `Redirect` how?

I have 2 urls say thinkingmonkey.me and thinkingmonkey.com both have ip-address 127.0.0.1 (A.K.A localhost). I want to redirect any requests to thinkingmonkey.com to thinkingmonkey.me. ...
0
votes
2answers
89 views

Unable to get mod_rewrite to stop processing

This is linked to Rewriting subdomain.domain.com when other 'subdomains' exist I need mod_rewrite to 'stop' processing, but it seems to continue on. On my registrar, I've set A records as: ...
0
votes
1answer
172 views

Rewriting subdomain.domain.com when other 'subdomains' exist

My httpd.conf looks like this: NameVirtualHost 12.34.56.78:80 <VirtualHost 12.34.56.78:80> DocumentRoot /var/www/html/site ServerName www.example.com <IfModule mod_rewrite.c> ...
5
votes
2answers
4k views

How can I redirect any ServerAlias to the respective ServerName?

I want to 301 redirect all example.org to www.example.org. The following example is doing just that, but it's got a lot of noise to it and is thus hard to maintain and error prone: <VirtualHost ...
1
vote
4answers
341 views

Redirecting www.example.com/folder to folder.example.com

I had mantis setup as www.example.com/mantis and now I've setup my httpd.conf to have it accessible at: mantis.example.com . Since I have many links referencing the earlier links, I need to redirect ...
0
votes
1answer
425 views

WordPress pretty permalinks not working

I can't get WordPress pretty permalinks to work on my Fedora LAMP server. If I set them and click a page/post link I'll get a ""Oops! This link appears to be broken." The .htaccess file is writable ...
0
votes
1answer
447 views

Apache “connection reset” only after setting RewriteLogLevel to >0 on Win7

I was working with mod_rewrite on my work computer, which runs apache 2.2 on XP. More pertinently, I was using RewriteLogLevel 9 for debugging. No problems. I went home to do more work with apache ...
0
votes
2answers
2k views

Apache2 - mod_expire and mod_rewrite not working in httpd.conf - serving content from tomcat

I am using apache2 server running on debian which forwards all the http request to tomcat installed on same machine. I have two files under my /etc/apache2/ folder apache2.conf and httpd.conf I ...
3
votes
3answers
369 views

How can I make Apache look in 2 separate directories with one common url ? follow-up question

This is a follow-up question to my previous question on this site. Maybe I should point out that the Apache server is running on a windows system, don't know if it matters. My problem is following: ...
2
votes
2answers
890 views

mod_rewrite, mod_alias, subdomain changes how domain serves website?

I've made a django site for a magazine, and it's found in mag.org/django-site. the old site is still at mag.org/httpdocs (hosted by mediatemple). I would like it so that a hit to www.mag.org turns up ...