juanvp Posted May 13 Share Posted May 13 Hello! Excuse me. Could you help me?For my hosted domain: Maracaibo.info, I need that any URL begining with www, to be redirected to the URL version without www. Is that possible?The reason is that I've a small problem with some links opening in a new tab of the web browser.Thank you for any help. Quote Link to comment Share on other sites More sharing options...
Ookma-Kyi Posted May 13 Share Posted May 13 3 hours ago, juanvp said: Hello! Excuse me. Could you help me?For my hosted domain: Maracaibo.info, I need that any URL begining with www, to be redirected to the URL version without www. Is that possible?The reason is that I've a small problem with some links opening in a new tab of the web browser.Thank you for any help. Yes, create a .htaccess file inside your httpdocs folder and put this as it's contents: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] Let me know how it goes. 1 Quote Link to comment Share on other sites More sharing options...
juanvp Posted May 13 Author Share Posted May 13 Thank you very much. I put that code inside .htaccess, saved it and then the links we're not working, After that, I put the former code of .htaccess, saved it again and something happenned. It's just working now as it was desired, all links opening in the same Tab. That's all fine!! Thank You again. Quote Link to comment Share on other sites More sharing options...
juanvp Posted May 13 Author Share Posted May 13 The complete solution was to add only these lines inside the <ifModule mod_rewrite.c> Tag: RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] To an existing .htaccess file. Without deleting the former content. For it could be useful for other people. Thank You. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.