Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Redirect question...

Options
  • 07-05-2021 6:51am
    #1
    Registered Users Posts: 723 ✭✭✭


    A press release for a website that we have mashed together has been released. Unfortunately, the URL included was incorrect.

    Should have been domain/win.html
    What was sent domain/win

    Is there any way to set up a simple redirect that sends .../win to .../win.html

    Obviously if it was an incorrect spelling I could just set up a quick and dirty redirect script on the "wrong" page and if there was the trailing / I could just mirror the directory but no, nothing that simple.

    Any suggestions would be gratefully accepted... cheers all!

    No trees were harmed in the posting of this message, however a large number of electrons were terribly inconvenienced.



Comments

  • Registered Users Posts: 5,867 ✭✭✭JDxtra


    Create a folder called "win". Inside here, place an index.htm file that contains your redirect code.


  • Moderators, Recreation & Hobbies Moderators Posts: 11,079 Mod ✭✭✭✭igCorcaigh


    Can you create a folder called win and tgen create a default.html file which contains a redirect.

    It's nasty, I know.

    Depending on your server setup, there's probably a better way.


  • Moderators, Recreation & Hobbies Moderators Posts: 11,079 Mod ✭✭✭✭igCorcaigh


    JDxtra wrote: »
    Create a folder called "win". Inside here, place an index.htm file that contains your redirect code.

    Aha, great minds eh?


  • Registered Users Posts: 723 ✭✭✭Timfy


    Guys... a thousand thank yous to you both. So bloody simple that I didn't even try that... I assumed that the lack of trailing / would throw that out the window!!!

    Superstars!

    No trees were harmed in the posting of this message, however a large number of electrons were terribly inconvenienced.



  • Registered Users Posts: 723 ✭✭✭Timfy


    Thread can be closed now.

    No trees were harmed in the posting of this message, however a large number of electrons were terribly inconvenienced.



  • Advertisement
  • Moderators, Recreation & Hobbies Moderators Posts: 11,079 Mod ✭✭✭✭igCorcaigh


    Timfy wrote: »
    I assumed that the lack of trailing / would throw that out the window!!!

    It won't, because the url lacks a file extension, and so the server will interpret win as a folder name.


  • Registered Users Posts: 6,490 ✭✭✭daymobrew


    I would think that a .htaccess file with a 301 redirect would be quicker for the browser:
    Redirect 301 /win https://domain.com/win.html
    Redirect 301 /win/index.hml https://domain.com/win.html
    
    You'd have to experiment to find which one works as it would depend on what the server sees the incoming request as.


Advertisement