Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Redirect question...

  • 07-05-2021 06:51AM
    #1
    Registered Users, Registered Users 2 Posts: 761 ✭✭✭


    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, Registered Users 2 Posts: 6,101 ✭✭✭JDxtra


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


  • Moderators, Recreation & Hobbies Moderators, Paid Member Posts: 12,809 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, Paid Member Posts: 12,809 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, Registered Users 2 Posts: 761 ✭✭✭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, Registered Users 2 Posts: 761 ✭✭✭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, Paid Member Posts: 12,809 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, Registered Users 2 Posts: 6,652 ✭✭✭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