web.config
Page 1 of 1
smith01




Posts: 337
Location: A Diner
PostPosted: Thu, 3rd Mar 2011 07:56    Post subject: web.config
I'm using a shared Windows server at GoDaddy.com, and I'm trying to redirect my mydomain.com to www.mydomian.com

I've been told that I simply need to create a web.config file on my server's root and put this code in it:

Code:
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Redirect to WWW" stopProcessing="true">
          <match url=".*" />
          <conditions>
            <add input="{HTTP_HOST}" pattern="^domainame.com$" />
          </conditions>
          <action type="Redirect" url="http://www.domainame.com/{R:0}"
               redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>


So I tried that, but it's been 24 hours and the redirection didn't work.

My site is written in asp 1.1 and someone suggested I migrate the server to IIS 7 from IIS 6 and then it will use that web.config file. Problem is, I didn't build this website, it was built by a friend and I have very basic knowledge with ASP, and I'm afraid that if I migrate to IIS7, the website will fuck up.

Any suggestions?


-0
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Thu, 3rd Mar 2011 09:32    Post subject:
Is there a rewrite module installed and enabled?
Back to top
smith01




Posts: 337
Location: A Diner
PostPosted: Thu, 3rd Mar 2011 10:05    Post subject:
That's the thing - I don't know, and GoDaddy doesn't know either.


-0
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Thu, 3rd Mar 2011 10:44    Post subject:
They suck then, it's their webserver isn't it? Do you have a control panel of any sort you can log in to?
Back to top
smith01




Posts: 337
Location: A Diner
PostPosted: Thu, 3rd Mar 2011 18:44    Post subject:
I actually just got a tip from one of their dudes saying I need to upgrade the server to IIS7, which I did, but now I cannot upload the web.config file to my root. I get access denied.

Any suggestions?

EDIT: Problem solved. I used their file manager and that did the trick.


-0


Last edited by smith01 on Thu, 3rd Mar 2011 18:49; edited 1 time in total
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Thu, 3rd Mar 2011 18:48    Post subject:
Change hosting company? They obviously do not know what they are doing and/or suggesting.


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group