Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RewriteUrl with Apache 2.4.23

7 views
Skip to first unread message

valm...@gmail.com

unread,
Jan 22, 2017, 5:43:40 PM1/22/17
to
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?
0 new messages