Questions tagged [base-url]

326 questions
10
votes
4 answers

How to set AngularjJS base URL dynamically based on fetched environment variable?

I have a development and production environment in which my URL's differ: production: www.exmaple.com/page development: dev.environment/project/page I know that I can set the base URL in AngularJS with the but that…
Daan
  • 6,621
  • 5
  • 36
  • 52
10
votes
5 answers

How to get the base URL of the website VB.NET

I may not be the first person to ask this question but I can't find what I was looking for after looking around. I want to get base URL from the URL. I have tried HttpContext.Current.Request.Url.AbsoluteUri It would return me the full URL …
lawphotog
  • 6,783
  • 19
  • 74
  • 121
9
votes
1 answer

How to set a base url for react-router at the app level?

I have an app created with create-react-app that I want to install in a subdirectory on my website. The recommended way is to add process.env.PUBLIC_URL as the baseurl. ie:
Fabrice
  • 357
  • 1
  • 3
  • 13
8
votes
6 answers

how to get Magento baseUrl through Javascript and then use it in jquery.hello-lightbox.min?

i'm trying to get Magento BaseUrl through javascript in head.phtml file, and then use it in jquery.hello-lightbox.min file, where i need the baseUrl to get some images. Here's what i have in head.phtml file: getBaseUrl() ;…
Guille
  • 244
  • 1
  • 6
  • 20
7
votes
3 answers

How to set the base url in drupal

Where I can set the base url for drupal site. Currently when I go to the site in my localhost, it redirects to the original site. Please help me. I have tried setting the $base_url in the sites/default/settings.php Here is the portion where I set…
Dijo David
  • 5,785
  • 11
  • 32
  • 45
6
votes
4 answers

Determining a website's 'root' location

I need some help with concepts and terminology regarding website 'root' urls and directories. Is it possible to determine a website's root, or is that an arbitrary idea, and only the actual server's root can be established? Let's say I'm writing a…
Yarin
  • 144,097
  • 139
  • 361
  • 489
6
votes
1 answer

Dynamically setting the BaseUrl within configuration in Symfony2

I know that within Symfony2's configuration, there is no reference to the base url, as there is no request; the application could either run in cli or within a web server, and therefore we cannot rely on request. But still, I have configuration that…
Steven Rosato
  • 2,135
  • 1
  • 21
  • 31
6
votes
3 answers

Bad rendering of the local index.html from public folder using HUGO

I am creating a web using RStudio and HUGO, by means of the Blogdown package. When serving the site locally in RStudio, it seems to be rendered properly. All the files are created within the folder /public. However, when I open the file index.html…
antecessor
  • 2,072
  • 1
  • 17
  • 40
6
votes
1 answer

It is possible to set the href attribute of a base tag in AngularJs?

I want to set the href attribute value of base tag based on a constant value. To do so I've declared the base attribute in the head element as follows: and I set the baseUrl value with this code…
Fedy2
  • 2,959
  • 2
  • 22
  • 41
6
votes
2 answers

UIWebView baseURL and absolute path

I have an HTML page that is constructed like this: It is stored in my documents directory: /Users/username/Library/Application Support/iPhone…
Thizzer
  • 14,949
  • 26
  • 90
  • 134
5
votes
7 answers

http://magento.local reverts to live site - Magento and Xampp for OSX

I'm having trouble trying to rebuild my dev environment. I've installed XAMPP and followed these steps: Backup MYSQL DB. Backup Home Directory. Create DB with same user/dbname Imported SQL file successfully, and imported home directory (and…
danchet
  • 410
  • 1
  • 7
  • 23
5
votes
3 answers

Set up the base url in codeigniter

I have the directory structure like this in code igniter: Appsite -website -application -images When I accessing the image in index.php I used:
qazzu
  • 311
  • 2
  • 5
  • 16
5
votes
2 answers

How create BASE URL of website if the menu are in different folder?

I know it is stupid to do but I have the situation that I create menus in different folders. And I tried to create the baseurl for menu. function getBaseUrl() { $currentPath = $_SERVER['PHP_SELF']; $pathInfo = pathinfo($currentPath); …
user5863306
5
votes
4 answers

How to set protractor(v1.4.0) baseUrl using protractor API instead of configuration file?

i use protractor v1.4.0 and I want to set protractor baseUrl from command line so i can't use baseUrl: 'http://localhost:8000/', config option in protractor configuration file. I want to define default value for base url with "params" option in…
Suren Aznauryan
  • 206
  • 3
  • 10
5
votes
2 answers

Django: No module named context_processors, Base URL

I've scoured the web for a solution but nothing seems to work. I'm getting the error: ImproperlyConfigured at /tool/page4/ Error importing module mysite.context_processors: "No module named…
Danny Brown
  • 284
  • 1
  • 3
  • 15
1
2
3
21 22