I have a question about 301 redirection

I want to redirect one of my sub domains url1.example.com to test1.example1.com and another sub domain url2.example.com to test2.example.com. Is there any way?

You can setup redirects in the cPanel as long as the subdomain is created.

But I want to use. Htaccess.

If you set it up in cPanel, it creates a .htaccess file if one does not exist and it puts a redirect block in. If you set it up, you can look at the contents of the .htaccess to see how it is done or you could search Google.

For url1.example1.com:
Redirect 301 / http://test1.example1.com

2 Likes

Url1 and URL2 point to my website. I want url1 to point to test1 and URL2 to test2

I think this will help you:

/url1.example1.com/htdocs/.htaccess contains:
Redirect 301 / http://test1.example1.com

/url2.example1.com/htdocs/.htaccess contains:
Redirect 301 / http://test2.example1.com


Do you mean redirect or point? I showed you how to redirect. Pointing is different.

Pointing

I believe you can set a CNAME for the url1 subdomain that points to test1.example1.com and so forth. You can also do this from the cPanel as well.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.