Redirect with every thing after the domain name
Tried to look for some tutorials of cPanel and Apache, but every thing that I found didn't solve my problem.
If you add parked domain and redirect this domain, it works, but not if you have something after the domain name.
This works...but If you input something after the domain not work
It still with .net and don't change to .com Can someone help-me with this. Thank you!
http://www.domain.net to http://www.domain.com
This works...but If you input something after the domain not work
http://www.domain.net/somenthinghere to http://www.domain.com/somethinghere
It still with .net and don't change to .com Can someone help-me with this. Thank you!
-
Have found the solution, with default redirect of cPanel don't work, but with this configuration now I have it working. Look. Original from cpanel redirect: (Not working) RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.net$ [OR] RewriteCond %{HTTP_HOST} ^www\.domain\.net$ RewriteRule ^/?$ "http\:\/\/www\.domain\.com\/$1" [R=301,L]
Working code, with redirect all the links after the domainRewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.net$ [OR] RewriteCond %{HTTP_HOST} ^www\.domain\.net$ RewriteRule (.*)$ "http\:\/\/www\.domain\.com\/$1" [R=301,L]
Difference only on the ^/?$ to (.*)$0 -
Hello :) I am happy to see you were able to find a solution. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
2 comments