• RewriteUrl with Apache 2.4.23

    From valmlouis@gmail.com@21:1/5 to All on Sun Jan 22 14:43:40 2017
    I am trying to add a subdir at the end of a redirected https Url
    But I am getting an invalid url message generated by the Apache server
    Below is the code

    <VirtualHost *:443>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !subdir$ /* If the subdir already exist, no need to add it again*/
    RewriteCond %{SERVER_NAME} ^mydomain.com$ [OR]
    RewriteCond %{SERVER_NAME} ^www.mydomain.com$
    RewriteRule (.*) "https://%{SERVER_NAME}/subdir" [R=301,L,PT]
    <VirtualHost>

    What am I missing?
    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)