URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
5 views

Apache config with rewrite causes loop [duplicate]

I have to port a WebApp to a new server. On both servers I use the Apache 2.x webserver. I have to redirect every user from m.domain.com/$restOfPath to m.domain.com/mobil/$restOfPath. With ...
1
vote
1answer
10 views

How can I force mod_rewrite to send user info component of a URI?

A colleague recommended I repost this from StackOverflow to ServerFault: This has been driving me crazy. I have a web application that's being served via Apache Web Server. The database server that ...
1
vote
0answers
11 views

Apache rewrite not finding path

I am trying to rewrite an internal path for specific requests. I have the following URL: ...
1
vote
0answers
38 views
+100

RewriteRule for root without the R flag is not working

I'm trying to do a cache system with files. And I was thinking of using mod rewrite to serve the cached file if it exist, or the php file (that will create the html static cache) if not. Here is the ...
1
vote
1answer
22 views

Apache (httpd) VirtualHost RewriteCond Variables not working

I am trying to make a dynamic virtual host entry with the intent of redirecting all traffic to .mydomain.com to /var/www/html/ this part works but I also what a Rewrite conditions that checks if the ...
0
votes
0answers
8 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 ...
1
vote
2answers
13 views

rewrite refuses to work

I want to rewrite this url: http://cyanogenupdatetracker.com/api/v1/show_devices.php to http://cyanogenupdatetracker.com/api/v1/devices I used this .htaccess file Options +FollowSymlinks ...
0
votes
0answers
28 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
1answer
21 views

Stop processing and return to client immediatly in Apache

I have a Apache 2.2 that hosts a proprietary (commercial) authentication module. That modules looks at every requests and might let them through if they are flagged and "anonymous ok" in the back-end ...
0
votes
0answers
21 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
1answer
27 views

apache mod_rewrite rule not working [duplicate]

I'm testing the rule below else where and it's working but on my system it's not (centos 7, Apache/2.4.6) [I changed my domain to domain.com for the post here] the purpose of the rule is to rewrite ...
0
votes
1answer
19 views

Remove double URL encoding on URL

I have a third-party shopping cart set up on my server using PayPal for payments. When a user completes a transaction they are redirected to the URL ...
0
votes
0answers
18 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 ...
-1
votes
0answers
25 views

Apache webserver configuration/access to only index.php

I'm trying to the below with Apache/2.4.6 (CentOS) webserver installed using yum. I've got my php pages served from /var/ww/html/project1 index.php is a symbolic link that points to a login page ...
0
votes
0answers
12 views

mod_rewrite leads to 404

I'm trying to redirect (internally) example.com/snippets/_filename_ to example.com/snippets/?f=_filename_ using mod_rewrite... And it is not working. The contents of my .htaccess file, which is ...
0
votes
2answers
61 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
25 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
57 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 ...
0
votes
1answer
18 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
35 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
10 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
19 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
63 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
68 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
15 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
31 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
36 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
36 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
57 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
18 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
127 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
57 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
53 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
31 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
25 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
38 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
14 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
90 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
23 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
21 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
76 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
20 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
22 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
15 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
18 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
19 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
182 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
149 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 ...