Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8262191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:41:13+00:00 2026-06-08T03:41:13+00:00

I am sure this should be possible but when I look at google, all

  • 0

I am sure this should be possible but when I look at google, all it tells me is how to get the filename and stuff, I don’t want this.

I am looking for this because I use Weebly as my webhost and it only allows for .html files – when you click “Home” you are brought to /index.html and when you open the site there isn’t a /index.html.

What would be a plus is if I can add (using an if statement of course) JS that redirects if the site’s url == http://kingdomofmuqtasid.weebly.com/index.html and points the body to: http://kingdomofmuqtasid.weebly.com.

PS: can the code be placed inside the body?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:41:14+00:00Added an answer on June 8, 2026 at 3:41 am
    window.location.href
    

    is the full URL of the current page. See the MDN doc page for window.location for more info.

    You could put this code in the <head> section or <body> section of your page to do the redirection.

    <script>
    if (window.location.href == "http://kingdomofmuqtasid.weebly.com/index.html") {
        window.location = "http://kingdomofmuqtasid.weebly.com/";
    }
    </script>
    

    P.S. This code goes in whatever page is served up when the viewer goes to “http://kingdomofmuqtasid.weebly.com/index.html”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's an important security issue and I'm sure this should be possible. A simple
I'm not 100% sure how I should word this question but I'll try my
I'm still not sure I totally get how this particular case should work out.
This is something that I'm sure I should know the answer to, but either
I'm fairly sure there should be an elegant solution to this (in MATLAB), but
Not entirely sure this is possible, but hoping to be pleasantly surprised. I have
Not sure if this is possible, but here is what I am trying to
Ok, so I am not sure this is even possible but I will ask
so I'm not entirely sure this is possible, but I am curious if it
Preface : I'm honestly not sure if this should be on StackOverflow, SuperUser or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.