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

  • Home
  • SEARCH
  • 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 6253743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:03:28+00:00 2026-05-24T14:03:28+00:00

I am looking to get http://www.mysite.com/app_directory in the model. Note my app is not

  • 0

I am looking to get http://www.mysite.com/app_directory in the model. Note my app is not in the site root. I need it to perform a cURL request and I don’t want to hard code it because the app location will change. I also need the check to return http://www.mysite.com if the app moves to the site root.

About it being a bad idea to have the model know about its environment, I was wanting to check if a URl is an external web page or a URl within the current website.

  • 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-05-24T14:03:28+00:00Added an answer on May 24, 2026 at 2:03 pm

    that would do:

    env('HTTP_HOST')
    

    it’s cake way of looking at:

    $_SERVER['HTTP_HOST']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, if I have http://www.example.com/mydirectory/myfile.aspx How can I get http://www.example.com/mydirectory I am looking
looking at this site: http://www.gofundme.com/sign-up/ they have a nice 'amount' input where you can
I have an app in the main directory of my site at www.mysite.com and
Link to page: http://www.northtreestudios.com/sandbox/ Wondering how I can get the background images of my
OK, I have my site going pretty well here: http://www.marioplanet.com But I've realized that
i'm looking at a stock/index: http://www.google.com/finance?q=google I've got firebug open, in firefox and when
Looking at HTML source code of http://www.google.com/finance/historical?cid=983582&startdate=Nov+28,+2000&enddate=Nov+27,+2010&num=200 I see that Google never closes td
I am looking at the LCOM metric as shown here, http://www.ndepend.com/Metrics.aspx So we are
As the title suggests. Any idea how to accomplish that? Been looking at http://www.html5archive.com/2010/12/04/geolocation-api-example-distance-tracking/
I want to let users access their pages by typing the url http://www.mysite.com/username So

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.