URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
11 views

Why is enabling the rewrite log in .htaccess not working?

I want to enable rewrite logging so that I can debug a rewrite rule but adding the RewriteLog directives is causing a 500 error. Version information: Ubuntu 14.04 Server version: Apache/2.4.12 ...
2
votes
0answers
28 views

Apache rewrite works under FreeBSD, not under CentOS

I have 5 production servers which are running FreeBSD 9.2, but we are planning on transitioning to CentOS. Because of this, I am attempting to set up some virtual machines to emulate our production ...
-1
votes
0answers
13 views

wrong REQUEST_FILENAME if subfolder has the same name as the host [on hold]

I got the following problem: I have a local wamp server with a virtualhost called admino. The needed vhost-info for that host is: <VirtualHost *:80> ServerAdmin arne@gmail.com DocumentRoot ...
1
vote
1answer
1k views

How to get apache to look for files in different subfolders folders?

I am definitely new to mod-rewrite stuff. Note:- here the URL is common, and all the folders and subfolders on same host. The url a user uses to access their page is ...
0
votes
2answers
352 views

HowTo rewrite subdomain to apache userdir

As described in http://cjmaclachlan.blogspot.de/2008/02/modrewrite-moduserdir-subdomains-and.html I want to rewrite internally http://xy.user.phpfarm.lan -> http://user.phpfarm.lan/~xy/ userdir is ...
0
votes
0answers
11 views

How to redirect a single char > with mod_rewrite

How to redirect a single char > with mod_rewrite ? I've tried so far and it doesn't work: RewriteRule ^%3E index.html RewriteRule ^/%3E index.html RewriteRule > index.html RewriteRule /> ...
0
votes
0answers
12 views

how to serve a single page application with openshift

I'm tryng to deploy a single page app on openshift. On openshift all the static contents have to be in wsgi/static dir, but I obviously want to serve my static index.html from the root. Every attempts ...
1
vote
3answers
980 views

Empty rewrite.log on Windows, RewriteLogLevel is in httpd.conf

I am using mod_rewrite on Apache 2.2, Windows 7, and it is working ... except I don't see any logging information. I added these lines to the end of my httpd.conf: RewriteLog ...
0
votes
0answers
7 views

Dynamic Subdomain with htaccess unchanged URL

I have a Codeigniter project Located at "domain.com/users/abc" directory. I want to access it with Subdomain "abc.domain.com/" and also I don't want the url in the address bar to change. There will ...
0
votes
0answers
31 views

Redirect the direct links to static files from non-www to www

My website is using WordPress 4.1.1, multisite, subdomain install. I've changed it from non-www to www successfully after updating the database ( ...
0
votes
1answer
22 views

mod_rewrite errors when migrating from Apache 2.4 to Apache 2.2

I have a list of rewrite rules stored in my website's .htaccess file, rewriting URL's like http://example.com/cloud/something to http://example.com/cloud/index.php?page=something. These rules worked ...
0
votes
0answers
11 views

Apache RewriteRule: bad flag delimiters

RewriteEngine On RewriteBase / RewriteRule ^/wheel_([A-Za-z0-9- ]+)_([A-Za-z0-9- ]+)$ /wheels.html?Brand=$1&Name=$2 [NC,L] This is the entire content of my .htaccess file. No error when I ...
5
votes
6answers
8k views

apache server-status not found. check if mod_status is enabled

I've enabled the apache_ plugins on a munin node: ln -sv /usr/share/munin/plugins/apache_* /etc/munin/plugins/ After restarting the node with service munin-node restart here are the errors I'm ...
0
votes
2answers
880 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
2
votes
1answer
816 views

Reverse Proxy (mod_rewrite) and Rails (absolute paths)

I have front end rails app, that reverse proxies to any of a number of backend rails apps depending on URL, for example http://www.my_host.com/app_one reverse proxies to ...
0
votes
0answers
21 views

mod_rewrite path info postfix and per-dir prefix

There's an issue with .htaccess configuration. I just need the url /category to match the category.php script, but when I try to open this url, there's a 404 error instead. Here's my .htaccess: ...
154
votes
5answers
27k views

Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About Mod_Rewrite Rules but Were Afraid to Ask

This is a Canonical Question about Apache's mod_rewrite. Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This ...
2
votes
1answer
1k views

Apache mod_rewrite - remove extension/add trailing slash/preserve directory structure

I am currently using the following .htaccess file to remove the .php extension from my files and add a trailing slash to all URLs: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond ...
1
vote
1answer
22 views

Apache2 Reverse Proxy - different handling or urls

I struggling with a reverse proxy configuration and specific rewriting/proxypass depending on URL-path. Szenario: Reverse Proxy in DMZ SSL ends on Reverse Proxy Requests should be passed to ...
0
votes
2answers
1k views

apache - query string rewrite rule appends condition to URL

In trying to rewrite site-search.html?searchword=search%20term as advanced-search#q=search%20term I always end up with advanced-search#q=%3Fsearchword%3search%20term The %3Fsearchword%3 ...
0
votes
0answers
10 views

How to allow connections from a Squid proxy AND another IP-range using mod_rewrite?

I have two virtualhosts on Apache. I will name one admin.example.com. I will name the other virtualhost blog.example.com. In my local network, there are some users under a Squid proxy. I want to ...
0
votes
1answer
878 views

Apache ProxyPass/RewriteRule with p flag: Return no content when response has multi-part content type i.e.images

This is a continuation of a previous question which has been implemented with a little change. Following is the structure I am going to talk about. My goal is to create the Tunnel/Proxy. ...
1
vote
1answer
16k views

RewriteCond Exception with REQUEST_URI to RewriteRule with new Domain does not work

Following Exception doesn't work. http://www.domain.com with and without /test redirect to http://www.example.de/foo/, but the exception should not! RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] ...
1
vote
2answers
1k views

How to add an additional RewriteCond to exclude a specific url?

I have an existing .htaccess file with the following rewritecond: RewriteCond %{HTTP_HOST} !^go\.domain\.com$ [NC] RewriteRule ^(.*)$ https://go.domain.com [R,L] In essence, everything on this ...
4
votes
1answer
2k views

Apache sends plain-text response when accessing SSL-enabled site without HTTPS

I've never encountered something such as this before. I was attempting to simply redirect the page to the HTTPS version if it determined that HTTPS was off, but instead it's displaying an HTML page ...
0
votes
0answers
45 views

What am I doing wrong in this code?

I want to redirect any request, adding a ".php" at the end of the request URI. But, if the URI has a slash ("/") at the end, I want to remove it and add .php at the end of the URI. The code below ...
0
votes
0answers
12 views

mod_jk mount is being bypassed by virtualhost rewrite rule

I have apache 2.4 and tomcat 5 configured with mod_jk. My webapp "dealernet" could be accessed without the port 8080 suffix directly at http://prefixa.mydomain.com/dealernet/login/login.do and life ...
0
votes
0answers
5 views

htaccess rewrite rule for subdomain results to redirect loop [duplicate]

Below is my htaccess config: RewriteEngine On # if the domain starts with "apply." # i.e. apply.example.com # redirect to application URI RewriteCond %{HTTP_HOST} ^apply\. [NC] RewriteRule ...
-3
votes
1answer
39 views

Redirect non www to www not working [duplicate]

I have created an .htaccess file with the following code in order to achieve this Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^example.lk[nc] RewriteRule ^(.*)$ ...
0
votes
2answers
4k views

Apache reverse-proxy intermittent error 113 - No route to host

I've got an Apache 2.0.52 server on CentOS 4 that front-ends a couple of App servers (mix of Jetty and Tomcat). Apache has a handful of virtual hosts configured like this: <VirtualHost ...
9
votes
11answers
882 views

.htaccess doesn't redirect to www-prefixed page properly

I'm trying to redirect an url without www. to www.version (example.com to www.example.com). I use the usual RewriteCond %{HTTP_HOST} ^example\.com [nc] RewriteRule (.*) http://www.example.com/$1 ...
0
votes
0answers
38 views

Apache 2.2.2 (Debian) mod_rewrite with mod_proxy removes the query string

I try to setup a reverse proxy configuration based on query string rewriting with Apache2, mod_rewrite, mod_proxy (and also mod_auth_cas, but I don't think it deals with my problem). The request flow ...
0
votes
1answer
40 views

How do I remove index.php from url in CodeIgniter 2.2 [duplicate]

I have tried all the methods I can find on the web but nothing seems to work. I still get a 404 page. I already modified $config['index_page'] = ''; and add the lines to .htaccess as suggested by the ...
0
votes
0answers
176 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
0answers
7 views

Can mod_rewrite [P]roxy to an HTTPS url when the inbound request URL is HTTP?

I have a host (IIS6, running an implementation of mod_rewrite for windows, by a co called Micronovae. It works well) that has a site at http://some.host.com I also have another host (on Microsoft ...
0
votes
2answers
55 views

Apache mod_rewrite : RewriteRule to pass requests tomcat application [duplicate]

I am having difficulty defining a correct RewriteRule to forward requests to an application running in tomcat. I have apache with mod_rewrite enabled as well as tomcat setup with an application ...
1
vote
0answers
14 views

Apache Rewrite of HTTPS on another specific port with hidden subdirectory [duplicate]

I have a Tomcat behind an Apache server and I would like to use the https request to be rewritten to the Tomcat on port 9001 with a hidden subfolder /test. hosts entry: 127.0.0.1 local.domain.com ...
2
votes
2answers
2k 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
13 views

URL rewriting a specific directory

I want to rewrite the URL when receiving a request that is not a file and either for directory subdir or not a directory at all. E.g. (!file) && ( (subdir ) | ( !directory ) ) Here's my ...
2
votes
1answer
64 views

apache mod_rewrite variable hostnames with one redirect?

I have a test server (webtest.example.com) and a live server (www.example.com). I also have example.org, example.net, etc. I want those to redirect to example.com. I also want any non-www entries to ...
1
vote
3answers
2k views

Why do some rewrite rules fail while AJP is serving all of my requests to Tomcat?

I have a Apache server using mod_proxy_ajp to have Jboss/Tomcat5.5 handling all the requests. Here is how I configured Apache 2.2.17, and for the most part, it works: # Proxy pass all work to ...
-1
votes
1answer
19 views

Domain keeps getting rewritten without mod_rewrite enabled

So essentially when I go to http://www.example.com OR http://example.com the URL gets rewritten to just www.example.com OR example.com dropping/removing the http:// part. I'm not sure why this is ...
1
vote
1answer
257 views

Apache mod_rewrite loaded and working, but not 'seen' by rssLounge application

I'm tring to install and configure RSS Lounge on my Raspberry PI (Wheezy 3.2.27). This is what I get when I go to http://localhost/rsslounge: The Apache module "mod_rewrite" is not loaded ...
0
votes
1answer
52 views

mod_rewrite in .htaccess and basic auth in vhost - access to paths

I want to lock down a website (made on Drupal) with basic auth. Drupal is using mod_rewrite in its .htaccess file. The problem I'm facing is this - my virtual host looks like this: <VirtualHost ...
1
vote
0answers
10 views

.htaccess redirect keeping url when there is wordpress code involved [duplicate]

I have two domains, alfa.com and beta.com. Beta.com points to alfa.com subdirectory named "ae" by following htaccess-file. It works fine, but what should I add to code to keep beta.com URL and not ...
-1
votes
1answer
32 views

How to set up htaccess to transfer from http to https? [duplicate]

This is my .htaccess - site does redirect to HTTPS but still gives: Your connection to the site is encrypted, but Google Chrome has detected mixed content on the page. How to avoid this? Thank you. ...
1
vote
1answer
253 views

DirectoryIndex not working properly for rewritten URL

I have domain.com and sub.domain.com pointing to the same server and I'm using mod_rewrite to rewrite URLs for sub.domain.com to the sub subdirectory. I have the following .htaccess file in the ...
0
votes
0answers
27 views

How to rewrite request for subdirectories using apaches' mod_rewrite?

My document_root is /home/john/public_html. I need the URL example.com/subdir/index.php to be handled by the file /home/john/public_html/index.php. This is what I put in ...
0
votes
0answers
19 views

Apache config for AllowOverride All in .conf file in conf.d not working

I have setup an Amazon EC2 LAMP server running Apache v2.2.29. I've loaded mod_rewrite and am trying to modify the entry to AllowOverride All. Rather than edit the httpd.conf file in the ...
0
votes
1answer
82 views

Arch-linux apache 404 mod_rewrite VirtualHost with url suffix

I have a problem with Apache on Arch-Linux. I assume it is related to mod_rewrite, but I am not sure. In the past I always worked with Debian-based systems. Arch seems a little different. I have a ...