I want to create a permalink (chris-admin) for a custom admin backend site located in my child theme directory (wp-content/themes/t25child/UI/). Been playing around with Wordpress' rewrite rules to achieve this and noticed a stranged behaviour:
add_rewrite_rule( '^chris-admin/(.*)$', 'wp-content/themes/t25child/UI/$1', 'top' );
The rule isn't even accepted by wordpress. I tried around for hours and realized that wordpress only accepts rules which have index.php as redirect target. The rule below is working like a charm.
add_rewrite_rule( '^foo/([^/]*)/?', 'index.php?pagename=$matches¶m=foo', 'top' );
Can anyone give me more insight on this?
Thank you very much!