URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
11 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
11 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
3 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
12 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
14 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 ...
-2
votes
0answers
19 views

Can I set the destination domain for Squid proxy based on subdomain of incoming request?

For e.g. My Squid proxy is hosted on myproxy.com Now if someone makes a request to - onedrive.com.myproxy.com/path?query I want Squid to fetch this request from - onedrive.com/path?query How ...
0
votes
2answers
41 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
45 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
23 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
19 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
21 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
47 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
23 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
119 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
21 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
18 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
12 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
15 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
14 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
24 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 ...
0
votes
1answer
86 views

How To Force Rewrite and Redirect Url [duplicate]

I have a url: http://domain.com/i.php?c=PT and I Rewrote it to http://domain.com/PT successfully. But When I browse http://domain.com/i.php?c=PT, it wont redirect to http://domain.com/PT. Is there ...
0
votes
1answer
94 views

ProxyHTMLURLMap not working in apache2.4

I am using apache2.4 on ubuntu 14.04. And I have enabled mod_proxy_html.But my URL are not getting replaced by a new one. Same thing I did in apache2.2 and it was working perfectly. This is my ...
1
vote
1answer
23 views

Unable to combine RewriteRule and Header set [duplicate]

Trying to implement the following: RewriteRule \.ttf$ - [E=cors:1] Header set Access-Control-Allow-Origin "*.example.com" env=cors:1 Header set Access-Control-Allow-Origin "*.sadface.com" env=!cors:1 ...
0
votes
1answer
60 views

htaccess: get request domain for mobile redirect

We have a mobile site that is served using multiple domains. We want to redirect users who are using desktop user agents to our desktop sites while preserving the original domain the user used to ...
-1
votes
1answer
39 views

Redirect for https and www [duplicate]

I currently have my rewrite rules in the post_virtualhost_2.conf file this in inserted into the httpd.conf file at the absolute end. I have two blocks that don't seem to be working <IfModule ...
1
vote
0answers
34 views

Special nginx hotlink protection conversion from Apache .htaccess rule

I have the following anti-leeching rewrite rule in Apache, which i'd like to have in nginx. I see cookie or referrer rule examples. But none combining both, so I am not sure how to go about this. ...
0
votes
1answer
27 views

How do I transparently redirect only the root directory on a DreamHost.com shared server? [duplicate]

The following DreamHost wiki explains how to transparently redirect your root directory to a subdirectory.. http://wiki.dreamhost.com/Transparently_redirect_your_root_directory_to_a_subdirectory The ...
0
votes
1answer
39 views

How do you prevent mod_rewrite from decoding a string in the path? [duplicate]

I'm trying to create a restful API using mod_rewrite. I have the rule: RewriteRule v2/(.*)$ v1/index.php?request=$1 [QSA,NC,L] However the path could contain base64 encoded strings (i.e. can ...
1
vote
0answers
34 views

Use custom environment properties from Elastic Beanstalk for htaccess

Is there a way to use the custom environment property of elastic beanstalk in htaccess? I only want to rewrite http to https when not running locally so I thought I could do this by using the ...
0
votes
1answer
39 views

mod_rewrite not acting as expected — missing path info

I've just installed a fresh apache (Apache/2.4.7 - Ubuntu) and created and enabled a site with a Document Root of /var/www/html. With mod_rewrite enabled, I proceeded to create a simple .htaccess file ...
-1
votes
1answer
31 views

symlink to PHP file not handled as PHP

I have PHP5 installed on an Ubuntu 14.04 server and it works fine. I create a file called foo.php anywhere in the document tree and it gets passed to the PHP interpreter just as you'd expect. ...
0
votes
1answer
50 views

mod_rewrite: strange infinit loop [duplicate]

I have a folder structure, like this: forum .htaccess [some more files] forum_english .htaccess [some more files] forum/.htaccess looks like this: RewriteEngine on RewriteCond %{HTTP_HOST} ...
0
votes
0answers
29 views

Apache HTTP to HTTPS Redirection on none HOST NAME

I'm not able to get a corect redirection from http to https on every url on my Apache on Centos. I got this in the httpd.conf: LoadModule rewrite_module modules/mod_rewrite.so NameVirtualHost *:80 ...
1
vote
1answer
45 views

Apache2.4 mod_rewrite won't redirect me to subdir based on visiting domain

I have an Apache2.4 server with public dir in /var/www/html. In that dir I have a Wordpress site with this .htaccess: RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f ...
1
vote
1answer
39 views

mod_rewrite date subfolder not working

I am having a strange issue that I am perplexed on. I will prelude with that regex is not my strong suit. I need feedback from the community to get this going. If I have the following URL: ...
1
vote
1answer
35 views

Denying a User-Agent in apache that uses mod_proxy

I want to prevent web crawlers from using an apache site that is configured to forward all requests to a ProxyPass. I have tried the BrowserMatchNoCase directive to set an environment variable ...
0
votes
2answers
39 views

How to rewrite URI from root if file doesn't exists in folder?

I have a static folder which is not in my document root. I would like to redirect all the files that are not present in document root, but are present in the static folder. (So if the same file is in ...
1
vote
1answer
32 views

How to point at all subdomains of a secondary domain to the main domain

I have a secondary domain name which I need its subdomains to point to my main domain. For example,If my main domain is example.com, then I have used example.org to point to the former. What I desire ...
0
votes
0answers
36 views

RewriteCond and LocationMatch

I am running a Magento instance and am trying to tune the browser cache headers appropriately. All requests should have cache headers set, except for the checkout pages (any url that like ...
0
votes
1answer
48 views

Reverse proxy Apache rewrite rule doesn't work

I've an apache reverse proxy and i try to make a rules for redirects few urls of example2 to example1 but my rewrite rules doesn't work. I've try this in the vhost of example2 : ProxyPass / ...
0
votes
1answer
22 views

Test file existence outside DOCUMENT_ROOT

I have this .htaccess file inside DOCUMENT_ROOT where it checks for the existence of a file, maintenance.enable and serves maintenance.html if it is present: <IfModule mod_rewrite.c> ...
0
votes
0answers
12 views

Apache mod_rewrite with proxy to HTTPS from HTTPS host

I am trying to use the mod_proxy to rewrite internal one URL to another in this way: RewriteCond %{HTTP_HOST} ^www\.domain\.de$ RewriteCond %{SERVER_PORT} ^443 RewriteRule ^blog/(.*)$ ...
0
votes
1answer
45 views

Mediawiki migrate existing wiki page to shortURL without afecting SEO (maintain old links)

Following the steps at: http://www.mediawiki.org/wiki/Manual:Short_URL http://www.mediawiki.org/wiki/Manual:Short_URL/Apache I have already migrate my wiki page from URLs: ...
0
votes
1answer
13 views

apache allowoverride points to wrong location

I installed a Slim framework to create a API and located this under /opt/modul/www/api index.php slim/ so the index.php is my main API file. And I want to access this in the browser under ...
0
votes
1answer
79 views

Mod_rewrite Underscores to Dashes (or Hyphens) in Opencart

I'm transferring an e-commerce site to a new shopping basket. For some reason the old site used dashes for categories but underscores for products. So the full url of a product looks like this: ...
0
votes
0answers
28 views

Apache rewrite rule not transforming URL as desired

I have an Apache site running that should only be accessed via HTTPS. What we wish to ensure is that if the site is called by it's DNS shortname (example, https://webserver01 rather than ...
1
vote
2answers
57 views

Why is everything after RewriteEngine On ignored?

So I'm trying to get mod_rewrite working on my new site. I've used mod_rewrite successfully a few years ago, but this time not a single command after 'RewriteEngine On' works. I'm getting exactly the ...
0
votes
0answers
20 views

Apache mod_proxy redirect with absolute domain

I am using the example from apache to rewrite a url with proxy: RewriteRule ^widget/(.*)$ http://product.example.com/widget/$1 [P] I want to set a absolute domain for this: RewriteRule ...