Need the code to create a .htaccess file (with custom redirects)
-
Hi,
I have a domain name https://www.minterest.com and it’s 301 redirecting to https://www.minterest.org.
And I’m using the following codes (in .htaccess) to do that:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^minterest.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.minterest.com$
RewriteRule (.*)$ https://www.minterest.org/$1 [R=301,L]
</IfModule>So, now I want to create a new directory in minterest.com (let’s say “BLOG”) and don’t want to redirect this new directory (and only this directory) minterest.com/blog/ to minterest.org/blog/. Everything else should redirect to its respective location on mintererest.org.
I know that we can rewrite .htaccess file to do this but don’t know its codes.
Can anyone help?
Thanks in advance and sorry if it’s confusing.
Happy Blogging!
- The topic ‘Need the code to create a .htaccess file (with custom redirects)’ is closed to new replies.