mcguffin/multisite-blog-alias

Path does not redirect

Closed this issue · 1 comments

If an alias example.com is setup to go to site www.example.com the path is lost during the redirect.

Example:
example.com/this/page/here -> www.example.com

Is there any reason that this would be a bad idea?

		header( 'Location: ' . trailingslashit($site_url.$path) );

untrailingslashit( $site_url ) . $path would be it...
For now I am a bit afraid to silently change the plugin's behaviour – some might already rely on this exact functionality.
However, redirecting with path is a good thing, so I made it optional.
Just add this line to your wp-config.php:

define( 'WPMU_BLOG_ALIAS_REDIRECT_WITH_PATH', true );

I'll add path redirect feature to the Admin in a later release...