Wordpress links pointing to the wrong domain -
in wordpress, how can change links pointing without changing server name or adding redirection?
my main site rails app @ www.example.com.
i have wordpress blog on separate server @ blog.example.com/blog
i have reverse proxy on primary (rails) server takes url ends in /blog/ , serves blog content. (that's behind scenes -- user never sees blog.example.com domain)
currently, can access blog via reverse proxy @ www.example.com/blog, problem urls on blog point blog.example.com/blog (wrong) instead of www.example.com/blog (right).
i've tried changing urls in wp-config.php, whenever change breaks something.
i figured out. here's did.
1) got rid of bitnami wordpress image (on amazon) , reinstalled wordpress fresh, scratch, on ec2. bitnami had bunch of magic behind scenes making hard me figure out going on.
2) via wordpress admin changed site address (url) http://blog.example.com/blog http://www.example.com/blog previously, had been changing in wp-config.php file, pretty sure doesn't same thing. needed change in wordpress admin. needed keep wordpress address same. found out site address governs urls displayed in theme, whereas wordpress address server hostname. i'm using reverse proxy why confusing.
3) enable pretty permalinks behind reverse proxy changed permalink settings in wordpress admin, updated .htaccess according instructions, modified /etc/apache2/sites-enabled/000-default changing allowoverride none allowoverride all. need enable mod_rewrite work on virtual hosts.
Comments
Post a Comment