Find Jobs
Hire Freelancers

Apache Configuration - ProxyPass/Reverse with Rewrites

$5-10 USD

In Progress
Posted almost 15 years ago

$5-10 USD

Paid on delivery
I have a website that uses rewrite rules.? I want to proxy requests to a sub-folder in this site ([login to view URL]) to another site (<[login to view URL]>) which also has rewrite rules (typical wordpress rewrite rules). The problem I am running into is that the ProxyPass and ProxyPassReverse directives do not seem to work (the client gets redirected to [login to view URL] - or at least that's the URL that gets shown).? I think I need to use the [P] directive with the rewrite rules, but I'm not sure where this needs to be done. Thank you for your help, John ## Deliverables I am using Apache 2.0 web server. rewrite rules are in .htaccess files in website directories.? in [login to view URL] file there is the following in a virtualhost: ProxyPass /blog/ [login to view URL] ProxyPassReverse /blog/ [login to view URL] and the user who requests <[login to view URL]> gets redirected to [login to view URL] whereas I want the user to stay at <[login to view URL]> but get all contect proxied (and reverse proxied) from [login to view URL] Here is .htaccess file for example1: RewriteEngine On RewriteBase / # If www+subdomain domain requested, externally redirect to subdomain without "www" rewriteCond %{HTTP_HOST} ^www\.example1\.com rewriteRule (.*) [login to view URL]$1 [R=301,L] #only use rewrite if the file being called does not exist!!! RewriteCond %{REQUEST_FILENAME} !-f #RewriteRule ^(.*) [login to view URL]$1 [L,NE] RewriteRule ^(.*) [login to view URL]$1 [L,NE,QSA] Here is .htaccess for [login to view URL]: RewriteEngine On RewriteBase /blogs/ #uploaded files RewriteRule ^(.*/)?files/$ [login to view URL] [L] RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* RewriteRule ^(.*/)?files/(.*) wp-content/[login to view URL]$2 [L] # add a trailing slash to /wp-admin RewriteCond %{REQUEST_URI} ^.*/wp-admin$ RewriteRule ^(.+)$ $1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . [login to view URL] [L] <IfModule mod_security.c> <Files [login to view URL]> SecFilterEngine Off SecFilterScanPOST Off </Files> </IfModule>
Project ID: 3902186

About the project

1 proposal
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$7 USD in 3 days
4.9 (40 reviews)
4.1
4.1

About the client

Flag of UNITED STATES
Corte Madera, United States
5.0
65
Payment method verified
Member since Mar 21, 2005

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.