.htaccess redirection
-
Hi there!
As many others, I am trying to proceed to a site redirection. I found many answers but none of them is working correctly. Let me explain.
In my “public_html” folder, I have two sites : my personal site and my wiki. Both of them are differents. Obviously, they share the same URL :
– https://www.mysite.com/site
– https://www.mysite.com/wikiCurrently, my “www.mysite.com” is nothing more than a “403 error”.
What I want is a redirection from “www.mysite.com” to “www.mysite.com/site”. I could do it through the “.htaccess” file located in the “public_html” folder, by typing :
RewriteEngine On
RewriteRule ^(.*)$ https://www.mysite.com/site/$1 [L,R=301]BUT, if I do this, I just can’t go to my “www.mysite.com/wiki” because it is automaticly redirected to “www.mysite.com/site/wiki” and obviously does not exist.
Can I do it through “.htaccess” ? Why not using a “If” query ?
Can someone help me good ?Thank you guys.
M.
- The topic ‘.htaccess redirection’ is closed to new replies.