skepticality Posted September 23, 2007 Share Posted September 23, 2007 Hello, I have been looking everywhere and have asked a few people who 'should' have known the answer to my question. Everyone always says that there *IS* a way... but I can't find the answer. <sigh> Maybe you all can help me out... I have a rather large website and it is also taking up a large swath of domain extensions, for obvious reasons I got them all just since many people that were looking for my site hit the wrong domain extension and couldn't find me. But, there is now a problem. I have a couple web-based applications that require people to always use the SAME extension, but since they are on the same server... things sometimes go sideways. What I was wanting to do is figure out what I need to do in my Apache to make my server change someone to the CORRECT domain when they hit the wrong one. Example: Someone types in www.skepticality.net it works, but if they hit any of the links that go to one of the applications where the .net version mucks up the system, things go nuts. I need it to AUTOMATICALLY change/switch to the same exact link but just switch the extension and nothing else... So, if I type: http://www.skepticality.net/somecoolpage.php it AUTOMATICALLY makes it: http://www.skepticality.com/somecoolpage.php What is the 'correct' way to accomplish this? Thank you in advance! Quote Link to comment https://forums.phpfreaks.com/topic/70303-how-do-i-do-this/ Share on other sites More sharing options...
hackerkts Posted September 23, 2007 Share Posted September 23, 2007 I'm not very sure if it work, Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.skepticality.net$ [NC] RewriteRule ^(.*)$ http://www.skepticality.com/$1 [R=301,L] Quote Link to comment https://forums.phpfreaks.com/topic/70303-how-do-i-do-this/#findComment-353237 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.