URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
2answers
25 views

Wordpress shows permanent loop redirect after upgrading from Apache 2.2 to Apache 2.4

I've upgraded my Apache 2.2 web server to 2.4 today and then some Wordpress installations started to get infinite loops from non-www to www and from www to non-www :( Removing .htaccesss didn't ...
0
votes
0answers
11 views

Haproxy and rewrite rules issue?

I have HAproxy listening on port 80 to send requests to a node server (port:3000) or php server (4000). The following rewrite rules should add a trailing slash to any url that is pointing to an ...
0
votes
1answer
27 views

Nginx url rewrite file not found

I have converted my .htaccess to work with Nginx but i have many 404 errors or wrong display for folder and subfolder rewriting. This Nginx config works for folder and subfolder but for /view/ its ...
-2
votes
0answers
12 views

apache 2.4 rewrite rule to change http://example.com/postfixadmin/ to https://example.com/postfixadmin [duplicate]

server : ubuntu 14.04, Apache 2.4, with php 5.5 i wanted to redirect "http" request for example.com/postfixadmin/ to https://example.com/postfixadmin/(anything). Below is my postfixadmin apache ...
0
votes
1answer
16 views

Redirect all vhosts when a certain condition is true

I am trying to redirect all vhosts to a certain url based on the REQUEST_URI. For example if somebody makes a request to www.something.com/condition on my server to be redirected to google.com I ...
0
votes
0answers
26 views

Replace all matching characters in a parameter value with mod_rewrite?

I am attempting to change all the space characters to a + in the token URL parameter value but I'm only getting the first occurrence to change. I have a 3rd party sending me a POST with unescaped + ...
0
votes
0answers
6 views

Denying access to autogenerated file in Apache and Magnolia

I have several virtualHosts in a machine with magnolia working on it. Magnolia auto-generate a sitemap's file so I'm trying to deny its access with Apache 2.4 I've tried this: <FilesMatch ...
0
votes
1answer
17 views

htaccess rewriting same page names conflict

My htaccess file has the following two lines RewriteRule ^payment payment.php RewriteRule ^payment-confirmed payment-confirmed.php When trying to access payment-confirmed.php it just goes to ...
1
vote
1answer
43 views

Apache Redirecting All Sub directory Sub Folders Back to Root Directory [closed]

I have a website stored in a root folder. example.com correctly brings me to the website stored in /var/www/mainsite. I want to put multiple websites in sub folders. so example.com/website1, ..2, ..3 ...
0
votes
0answers
38 views

Match subURIs to index.php file on Apache Passenger

I have the following configuration within a VirtualHost block: #Passenger config DocumentRoot /home/me/railsapp/public <Directory /home/me/railsapp/public> AllowOverride all Options ...
1
vote
1answer
12 views

mod_rewrite not working on web root dir

With the Apache/mod_rewrite config below i get a 403 forbidden error for any CGI scripts on the root /var/www/ I don't get any error for static files. Scripts out of root dir i.e. ...
0
votes
1answer
28 views

“deny all” for all files in a directory

My server is getting hit hard by bots, etc., looking for various files in /cgi-bin/, like search.cgi, YaBB.pl, gitweb.perl, perl, gitweb.pl, htsearch, and on and on. I want to deny all access (send a ...
0
votes
1answer
22 views

Allow Parent .htaccess to redirect all assets

We're migrating from one subdomain to another. This particular domain has a subset of several websites. I've setup the following rewrite to handle the redirect globally: In docroot/.htaccess ("Rule ...
0
votes
1answer
30 views

Mod_rewrite rule to force use of particular domain name for a specific directory

I'd like to force the use a different hostname/domain name for a particular directory on my site. Currently, there is a directory that contains several webpages at mainsite.com/directory. For the ...
0
votes
1answer
32 views

Apache 2.4 mod_rewrite in Vhosts not working in WAMP local server, but working in .htaccess

I had some mod_rewrite rules in Apache 2.2 local dev server and they were working fine. Now After upgrading to Apache 2.4, I am trying to do a simple mod_rewrite rule and it is not working. It is ...
1
vote
0answers
15 views

Converting .Htaccess Rewrite Rule to Nginx

I have the following apache rewrite rule which I am trying to convert to work with nginx. RewriteRule ^(.*)\/(.*)-(\d{4})(?:-(.*))?$ album.php?artist=$1&album=$2&releaseyear=$3&extra=$4 ...
2
votes
2answers
63 views

.htaccess Lost SESSION after header redirect using mod_rewrite [L, QSA] with started session

PHP version 5.4.41 Apache version 2.2.15 Linux version 2.6.32 CentOS 6.6 I have some code that won't redirect properly. There is a lot of code and configuration, so I'm going to try and keep it as ...
1
vote
2answers
46 views

Combine http to https and domain redirects using mod_rewrite

I'm trying to redirect www.example.com to a hosted blog at https://www.example.wordpress.com. The domain redirect works, but gives me a 403 error because it's redirecting http to https. Example.com is ...
0
votes
0answers
45 views

Is there a way to redirect HTTP to HTTPS using mod_proxy_ajp or this could be done only at mod_rewrite side?

What is the easiest way to redirect http to https when mod_proxy_ajp is used? I have the configuration below for mod_proxy_ajp: ProxyPass /home ajp://localhost:8080/home ProxyPassReverse /home ...
0
votes
0answers
28 views

fallbackresource vs htaccess which one?

I have a website that uses .htaccess file. After digging for a problem I had, I found that I can use FallbackResource. It makes everything way simple on the apache configuration but more work on the ...
0
votes
1answer
17 views

mod_rewrite - detect a GET Request URL and render index.php

Sorry for the 1000000 topic on this, but I've been trying and searching for hours and couldn't find anything. Basically, I have already used mod_rewrite to allow someone to type in ...
0
votes
0answers
23 views

apache rewrite rule to a file out of DocumentRoot

[Ubuntu14/Apache2.4] I would like to use a Rewrite rule to a file out of DocumentRoot: RewriteEngine On RewriteRule (.*).abc /etc/myproject/myfile.php?File=$1.abc [NC,L] But, I can't because ...
0
votes
0answers
10 views

redirect/proxy subfolder to different server

I was hoping someone could tell me the best way to achieve the following. I need to redirect a subfolder of a Wordpress site to a different server, while keeping the URL intact. I've tried a few ...
1
vote
1answer
66 views

Included rewrite rules not matched

With Apache, I'm trying to set up a rewrite rule which will be included in several virtual hosts. Actually, this rule file is included in 2 vhost. The first vhost contains only this rewrite rule (and ...
0
votes
0answers
15 views

Truncate URL's with Apache mod_rewrite

I am trying to strip incoming page requests to 25 characters after the year/month structure of the URL on my Wordpress server. Reason is, there are a number of external 404 links that I would like to ...
0
votes
0answers
18 views

mod_rewrite trailing slash woes [duplicate]

So I have the following .htaccess mod_rewrite which I'm hoping to use to strip trailing slashes: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 ...
0
votes
0answers
19 views

Apache2 keeps rewriting https even though rewrite rules are removed

I am running multiple virtual hosts on a local machine running Ubuntu 14.04 and Apache2. Let's assume that the project I am trying to access has the ServerName directive set to website.local When I ...
0
votes
0answers
8 views

Redirect ip with folders to domains with htaccess [duplicate]

Currently I am using .htaccess file below, but it only redirects correctly with simtanda.com and not with "heartslovefree.com". So help me out please: RewriteEngine on # SIMTANDA RewriteCond ...
0
votes
1answer
67 views

How to share a Single Domain SSL certificate across 2 ip addresses

I have a wordpress website example.com. I have a single domain SSL certificate that can be used across multiple servers. When a user visits example.com, or any subfolder expect forum , they access ...
0
votes
0answers
18 views

Apache2 Rewrite Rule - set a default directory

I'm trying to configure my Apache2. At the moment, when a user navigates to: http(s)://eamorr.com/whatever/ he is served pages from the directory /home/eamorr/eamorr.com/www/whatever (the "www" ...
0
votes
0answers
20 views

apache rewrite rule to strip subdirectory

I have a tomcat application with apache in front of it with proxypass. The application lives at http://host:8080/application and I the proxypass config means I can access it at http://host However, ...
0
votes
0answers
12 views

two parameters in RewriteMap dbd sql query

Is there any way to use %s twice in sql Query of DBD query? RewriteMap vhost "dbd:select path from www where url='%s'" this is working, but this not: RewriteMap vhost "dbd:select path from www ...
0
votes
0answers
16 views

apache2 mod_dbd and postgresql

I'm trying to rewrite url using dbd. Everything looks ok, except few things: It doesn't work It doesn't show any error (LogLevel Trace8) It doesn't show any connection to database (postgresql.log ...
0
votes
0answers
18 views

One session data for two domains

i have two different domains: domain1.com domain2.com I need to display a website from domain2.com on domain1.com. Now i use mod_proxy for this, like this: RewriteEngine on RewriteCond ...
0
votes
2answers
98 views

Redirect page/subfolder to new domain url without changing url in browser

I have been looking for an answer this without any luck (searched everywhere) Basically, I want to rewrite a page (subfolder) to a new domain without changing the url. I've tried with no luck: ...
0
votes
0answers
124 views

Mod - Rewrite / .htaccess Issue with Apache 2.4.12

The file structure is as follows Public files: /home/usrname/public_html CGI BIN, where the software is running: /home/usrname/public_html/cgi-bin Private files: /home/usrname/public_html/_private ...
0
votes
2answers
55 views

Redirect wildcard subdomain to same subdomain on different domain

I have a domain with dynamic subdomains. The domain, unfortunately, has changed. As such I need to redirect *.domain1.com to *.domain2.com while keeping the subdomains the same. I have looked ...
2
votes
1answer
46 views

Is it possible to enable htaccess for one directory only?

I've investigating performance problems on a website. The software we're using requires htaccess (i.e. it generates .htaccess itself if it's not there, so moving the rules to httpd.conf is not an ...
0
votes
1answer
28 views

mod_rewrite Proxy - maintain host headers

I am using mod_rewrite to proxy a sub-directory like this: RewriteRule ^somedir/(.*)$ http://proxy.example/somedir/$1 [P,L] That means that requests to http://local.example/somedir are proxied ...
0
votes
0answers
58 views

Use mod_rewrite & mod_jk to access different workers

I want to achieve the following: There is one DMZ-proxy over which we want to access multiple application-servers, represented by mod_jk workers. The web-context needs to be the same on all ...
0
votes
0answers
13 views

Mod_rewrite entries in global Apache config disable mod_rewrite in .htaccess [duplicate]

I'm trying to redirect some IPs globally to a specific URL. I've put <directoryMatch /var/www/vhosts/(.*)/httpdocs/> RewriteEngine On RewriteCond %{REMOTE_ADDR} ^111\.11\.11\.[0-9]$ ...
0
votes
0answers
9 views

Apache rewrite to tidy up image urls [duplicate]

I am using the htaccess file that ships with the skeleton application for Zend Framework 2. Here it is: Options -Indexes RewriteEngine On # The following rule tells Apache that if the requested ...
1
vote
1answer
32 views

mod_rewrite activated but error logs

The mod_rewrite is running on my system but I still have an error at the apache2 error_logs. me@server:# ls /etc/apache2/mods-enabled | grep rewrite rewrite.load Content of rewrite.load LoadModule ...
1
vote
2answers
133 views

htaccess redirect loop only on one of two servers

I have a web app installed on two servers. On one of the servers, when I'm accessing the homepage I get the "Error code: ERR_TOO_MANY_REDIRECTS" error in the browser while on the other one everything ...
0
votes
1answer
23 views

Having issues with inconsistent application of mod_rewrite rules

So I've been asked to clean up the URL's for the web app that we're currently running on apache (version 2.4.9 if so interested), but after messing around with mod re_write commands for a few hours, I ...
1
vote
1answer
21 views

httpd forward traffic from a url to another machine on same lan virtual host

I'm running HTTPD on a CentOs 6 server. I have 2 servers on the same LAN as eachother. I only have 1 IP address. I have 2 domains pointing at the router and I want example1.com handled by server 1 ...
1
vote
0answers
20 views

apache2.2: ldap_userdir + mod-rewrite does not work properly

My apache config: DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory ...
0
votes
0answers
29 views

https apache2 rewrite rule returns loop page

I have a rewrite rule that should redirect (http) membership.newref.php to (https) example/membership.newref.php Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ...
-1
votes
1answer
16 views

Godaddy .htaccess and mod_url

I'm an experienced full stack developer and freshly minted webmaster. Recently my client asked me to create a redirect from one url to an outside page. I know how to make a page redirect and I'm ...
1
vote
1answer
51 views

ProxyPassMatch and mod_rewrite order of operation

I've got a situation with Apache 2.4, PHP-FPM and Wordpress Multi user in sub folder mode. All non *.php files work fine in the subfolder, as does the main example.com/subblog/ url, however anything ...