I have Wordpress running on a server running Apache 2.4 (wordpress). Wordpress is running on port 8080. We have a proxy back to Wordpress going from port 80 (proxy:80) to 8080 (wordpress:8080) on a separate server. We I try to reach proxy:80, I get redirected to proxy:8080. I'm sure that there's an issue with my htaccess file. Here it is below.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteCond %{SERVER_PORT} ^8080$
RewriteRule ^http://%{HTTP_host}%{REQUEST_URI} [P]

RewriteRule ^/([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . /index.php [L]

# END WordPress

The goal is to have proxy:80 host the Wordpress site without redirecting to 8080. Any thoughts?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.