URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
8 views

Rewrite rule for custom parameter

I need to write a rewrite rule that will do the following: When user enters mysite.com/whatever, this address will stay in the browser but in the background following address will be called: ...
0
votes
1answer
16 views

Can I not setup multiple redirects using apache?

I have single web application on the server with multiple domain names (pittsburgh-app.com, philadelphia-app.com, etc). Now the domain names are changing to (new-pittsburgh-app.com, ...
-1
votes
1answer
20 views

Redirect domain to specific URL on other domain [duplicate]

I have got apache2 server with one virtual host. It is typo3 CMS. There are multiple pages: foo.com -- DNS A record --> 32.32.32.32 |_ foo.com/bar/ |_ foo.com/baz/ Now I want to configure ...
-1
votes
1answer
15 views

How to make a RewriteRule on Apache .htaccess to fix a broken image? [duplicate]

My page has: <img src="/?cp_contactformtoemail_captcha=captcha&a=1&b=2&c=image.jpg" id="captchaimg_1" alt="security code" border="0"> But it should be: <img ...
-1
votes
2answers
43 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
31 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 ...
0
votes
0answers
12 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
17 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 ...
0
votes
0answers
19 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
41 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
31 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
16 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 ...
0
votes
0answers
27 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: ...
1
vote
1answer
28 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
0answers
11 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
0answers
47 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
43 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
0answers
44 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
48 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 ...
1
vote
0answers
8 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
57 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 ...
1
vote
1answer
15 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
65 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
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 ...
0
votes
1answer
55 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. ...
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
20 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
99 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 ...
1
vote
0answers
39 views

Convertion of htaccess rewrite rule to nginx [closed]

Through searching the internet with "converting htaccess to nginx rule" I came up with anilcetin and winginx .htaccess to nginx converter which I doubt it doesn't correctly output what I need. Which ...
0
votes
0answers
17 views

wordpress rewrite mess with mod_jk [duplicate]

I would like to run a wordpress site under apache and then a subpath e.g. http://example.com/tomcat/ will be served under tomcat. I have [compiled the mod jk ]: ...
0
votes
0answers
19 views

Mod-rewrite with GET [duplicate]

I'm trying to get my htacces to rewrite URLS with GET parameters but hopelesly failing. I'd like for this: domain.com/landingpage?variableone=true&variable2=false to be converted to this: ...
0
votes
1answer
28 views

Chain rewrites of Apache requests for VirtualHost to another server in same network

Here is basically what I would like to do: http request comes in, portforwarding in router sends it to a server in the local network (server A) the server identifies the request for a virtual host ...
0
votes
0answers
27 views

simple conditional mod_rewrite for redirecting wrong urls

I have an assignment to add storeId parameter to wrong urls. It should behave like this: If url has directorystore/a in it like www.example.com/store/a - the next directory in path has to be ...
0
votes
0answers
28 views

Apache mod_rewrite to remove slashes is writing redirect using the filepath not a uri

Unfortunately I don't have direct access to this server so trial and error via a proxy person is proving difficult. We have the following Location directive (along with others) within a VirtualHost ...
-2
votes
2answers
50 views

What will happen if I force https for my image hosting site via .htaccess but embed an image with an http link? [closed]

I've built myself a small image hosting service for my own projects and I recently switched the site to https which works perfectly. Now I made a .htaccess file with a rewrite rule as described here ...
0
votes
1answer
20 views

mod_rewrite combine these two rules into one

I have two rules that currently function as they should, but I feel like they can be consolidated into one for the benefit of a smaller config to maintain and less rules to process for each HTTP ...
0
votes
2answers
67 views

ProxyPass only if file doesn't exist

I've seen this example: RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://app_cluster%{REQUEST_URI} [P,QSA,L] I need a similar thing that will delegate to ...
0
votes
0answers
58 views

Apache Redirect Inconsistency

I have a website and visitors visiting the website at www.example.com should be redirected to example.com. However, instead an "infinite loop" was generated. When I look closer, I notice something ...
0
votes
1answer
35 views

Apache mod_rewrite rules aren't triggering?

I have an archive of the Twitch Plays Pokemon Reddit updates on my server (http://flarn2006.dyndns.org/tppupdates/). Some of them include links of the format "/u/username", which is valid on Reddit, ...
1
vote
0answers
32 views

Apache rewrite rule for multiple named virtual hosts with a 'catch all' rule

I have a redirect apache server that I setup for about 30 domains. I want to have all requests get redirected to the main server except for 1 domain. Basically any domain coming to this server gets ...
0
votes
1answer
136 views

Apache 404 returning 500 errors. Request exceeded redirects

I'm trying to setup a site with static HTML with Apache 2.2.22, but I'm getting a 500 error instead of 404. The message in the error log is: [Sun Dec 14 09:48:45 2014] [error] Request exceeded ...
3
votes
3answers
156 views

Block traffic behind AWS ELB

My web servers are behind ELB, I want to block traffic from some specific user agent which is a DDOS attack. Apache always see ip address of ELB as an end user so I tried below attempts: Blocking IP ...
0
votes
0answers
54 views

Rename file in apache

I maintain large files versioning on a server. Files are stored rewrited (hashed) on several folders, such as : For file test.avi : FOLDER1/aeriuyzekjshdfkjh FOLDER1/aeriuyzekjshdfkjh#1 For file ...
1
vote
0answers
44 views

Apache mod_rewrite rule to pass specific REQUEST_URI to specific html files

I have a very basic html presentation which I want to use Apache mod_rewrite to handle the URLs. home.html is just an intro page but I want this to be called when there is no REQUEST_URI ...
0
votes
0answers
31 views

301 redirect with mod-alias and mod-rewrite

my htaccess file has these lines: RewriteRule ^newlink ?do=something Redirect 301 /oldlink/ /newlink when i write http://www.example.com/oldlink/, browser redirects to ...