HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to redirect using htaccess?
maxyaeger
New
Hello guys how will you do this in htaccess.
Reason for this is i moved my site from mybb to vanilla same domain name and same location both in root directory but the url scheme are different, my google webmaster tool says i have thousands of error links. I read that redirect 301 could help?
will this work?
//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com[nc]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [r=301,nc]
Thanks
0
Comments
You can't have two htaccess files in the same folder. You need to use subdirectories for one or the other.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
hello thanks for the reply, sorry if my post is not clear.
I moved from mybb to vanilla and mybb urls are not similar to vanilla so all my old post/threads on mybb are all invalid links when accessed via google.
I read that its better to do 301 redirect than having invalid or page not found link. With that said what rewrite should i add to my current vanila htacess.
Thank you
You ported your mybb using porter into a new Vanilla installation using a fresh database but the links to the old discussions do not work ? They should as far as I know.
Any way you can google how to
https://mediatemple.net/community/products/grid/204643080/how-do-i-redirect-my-site-using-a-htaccess-file
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thanks for the reply and suggestion.
I have like 10k links on google, so those links are all pointing to tld.com/thread-name and its different from vanillas urls which is tld.com/discussion/thread-name