Questions tagged [base-url]

Denotes question regarding Magento Base URL

Filter by
Sorted by
Tagged with
0
votes
1answer
33 views

Magento frontend and backend broke : Magento 2

/app/etc/env.php --- 'localhost' vs '127.0.0.1' I changed localhost to 127.0.0.1 however my Magento frontend and backend broke after that. 'db' => [ 'table_prefix' => '', '...
0
votes
1answer
21 views

Magento 2 Migration problem

I recently migrated my Magento store to a new server. I moved the whole store, import the database, the SSL certificates and modify domain dns so it points to new Server's IP. The problem is that when ...
0
votes
2answers
33 views

Magento 1.9 rewriting base store url for multiple websites

I have three different websites and within one website three stores on a single Magento 1.9 installation. 1. www.domain1.com 2. www.domain2.com 3. www.domain3.com Each domain contains three ...
0
votes
0answers
19 views

Use relative URL's for static content in Magento 2

Is it possible to use relative URL's in Magento 2? So change links like https://www.domain.com/my-product-title to /my-product-title. And also use relative URL's for javascript and css references?
0
votes
0answers
30 views

Magento 2 admin panel is down after changing Base URL

I have changed Base URL secure and unsecure from the backend. I had the following url= http://subdomain.domain.org/folder (also https) and I changed it in order to have http://subdomain.domain.org/. ...
1
vote
0answers
19 views

Different storeviews (languages) with different url's not working

We have a multilanguage store, was working fine. Now we changed the URL for every language but now the switch is not working anymore. Not even changing the language anymore. compile, cleaning cache, ...
3
votes
2answers
46 views

How to setup more than one project in docker?

I have successfully installed Magento 2 with sample data using Docker everything works fine but I have below question. Magento 2 project Base URL is 127.0.0.1 How can I change this URL? What if I ...
4
votes
2answers
160 views

How to get base url in Unit Test?

This is my unit test in my custom module: namespace Star\Trek\Test\Unit\Model; class BeyondTest extends \PHPUnit\Framework\TestCase { } How can I get my Magento 2 base URL in there?
0
votes
1answer
33 views

Magetno 2 base url 302 redirection

Hi I am trying to implement add extra key to base url example my base url:: abcd.com if user click on any key with base_url like below user entered url :: pawan.abcd.com site need set new theme if ...
0
votes
1answer
38 views

Magento 2 Base Url path issue custom theme

I have a Magento 2.3.1 site installed in a subfolder and I have a problem with base URL. When I have a link like this < a href="#" > LINK < /a > Instead of this www.domainname.com/...
0
votes
1answer
37 views

Using ngrok with Magento 1 issue

I have a virtual host set up. My local url is http://test.local When I start ngrok, my local url will become: http://test.local.ngrok.io so I changed my base secure and unsecure url to: http://test....
0
votes
1answer
79 views

Magento 2 - How to get Base URL in cronjob

In other file I use this code to get base URL $this->storeManager->getStore()->getBaseUrl() where $this->storeManager is a instance of \Magento\Store\Model\StoreManagerInterface My ...
0
votes
0answers
20 views

Same DB for multiple stagings

I am creating multiple staging servers for my Magento 2 website. staging1.mywebsite.com staging2.mywebsite.com staging3.mywebsite.com Is it possible to have single database for all 3 of my staging ...
4
votes
1answer
121 views

Magento2 Getting error as variable @baseUrl is undefined in file /var/view_preprocessed

On doing php bin/magento setup:static-content:deploy -f I am getting error Compilation from source: vendor/magento/theme-frontend-blank/web/css/email-inline.less variable @baseUrl is undefined ...
1
vote
1answer
29 views

Magento 2.1.3 Build multiple store views with unique subdomains pull CSS and JS from parent website URL?

I've been googling this all afternoon, suffering from Search Engine blindness, so much so I even tried bing for a moment... I have a multiple language site set up with different URL's assigned to ...
0
votes
1answer
33 views

Magento 2 : Update url to domain

I'm using an Instance of Ubuntu 16.04 lts on Google to run a store, but I'd like to point to my domain. Wich line on Apache2 should I update?
2
votes
0answers
56 views

M2: getBaseUrl() - StoreManagerInterface vs StoreConfigInterface

If someone asks for getting base URL, the answer is always to use StoreManagerInterface, like ... protected $storeManager; public function __construct( ... \Magento\Store\Model\...
0
votes
1answer
22 views

Magento Multisite links go to wrong domain

I have created a new website within my Magento (1.9.3.10) I've created a home page and got the menu visible. When you click on a Menu item, it links to my other website domain, showing a 404. I have ...
1
vote
2answers
298 views

Magento2: Remove home after base url

How to remove /home after baseUrl ? www.baseurl.com/home I want to redirect www.baseurl.com/home to www.baseurl.com (301)
0
votes
1answer
58 views

Magento 2.2.6 CSS JS not loading in admin panel after changing base and custom admin URLs

It's a multi store site in development and I changed the test URL to one of the production URLs for the default Base URLs and one of the store Base URLs. I also changed the option to Use Custom Admin ...
0
votes
0answers
580 views

TCPDF ERROR: Unable to create output file in Magento2

I am trying to get PDF Download able, I installed TCPDF library by this: composer require tecnickcom/tcpdf and created PDF Document as: // create new PDF document $pdf = new \TCPDF(...
0
votes
1answer
50 views

Full base url appended after base url when reaching page

For a demo environment, I had to upload my Magento project to a server, without a domain name. My Magento base URL is http://62.221.209.128/plesk-site-preview/rodrigootazu.com/62.221.209.128/, but as ...
1
vote
1answer
25 views

How to change base_url of other stores?

I exported a live database from a magento installation with 2 websites and 3 different stores and imported it on another magento installation. I already changed the base_url of the main store, but ...
0
votes
2answers
59 views

Magento 1.9.3.8 Full https causes double / ending

I made my entire site https by changing the unsecure_url to https rather than http. Then in my .htaccess I added: RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=...
0
votes
2answers
271 views

Two Magento apps with single Database and Base url

I just need a help from you people. I am trying to connect two Magento web applications with a single database. It was done successfully but the problem I am facing is with the base URL. I have two ...
-1
votes
1answer
227 views

Change base url of Magento 2 without Changing in Magento Database

How to Change base URL of Magento 2 without Changing in Magento Database For Example: magnentoxyz.com means it will redirect to my Magento frontend localhost/ means it will go to phpmyadmin page
2
votes
1answer
2k views

Get base url in email template

I've created a custom footer template inside my theme folder app/design/Vendor/Module/Magento_Email/email/footer.html , the problem is i need to get base url inside this html file.
0
votes
2answers
188 views

CSS/JS don't load after changing URL

I have two store views, I changed one of them from wesbitetest.com to websitetest.com/fr-ca/ but the front end didn't load the js and CSS files as expected, and the URL becomes websitetest.com/fr-ca/?...
0
votes
1answer
160 views

Server folder appears as output url for media, js and skin

Any ideas why Magento 1.9.2.4 sets the beginning of the media, skin and js url's like this /var/www/domain.com/html/ instead of normal http://www.domain.com like it has been set in unsecure_base_url ...
2
votes
0answers
2k views

Get base url in css file

Is there a way to load base url for background-image in css file? for example: background-image: url('{base_url}/myimage.jpg'); background-repeat: repeat;
0
votes
4answers
817 views

How to get secure baseurl (https) in magento 2? [duplicate]

with this code im getting http://url.com i want to get https://url.com using object manager. i'm using magento 2.0.4 echo $store->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_WEB); echo '&...
1
vote
1answer
3k views

Magento 2: Get base URL in web template [duplicate]

How can we get Magento 2 base URL in web template (.html file) ? Note: I am talking about web template (.html file). Not about general templates file (.phtml file).
0
votes
1answer
967 views

Changing base_urls to work on localhost

I have some databases which we use for our staging servers to test changes to code, and I want to import them and use them locally. I've managed to import the database fine, but my admin panel is ...
1
vote
1answer
108 views

How does Magento determine the route / getting 404 behind proxy

I have the following constellation: NGINX in front of two apache vhosts One Vhost running Magento (port 8181) Proxy pass of https://example.de.testing.abc.de/en/shop/ -> http://127.0.0.1:8181 No ...
1
vote
0answers
41 views

Magento 1 - Is it safety to use Store Code in URLs?

I need a multi language store using domain.com/fr/ domain.com/it etc structure (are more than 10 stores so domain.en domain.fr domain.it etc is not possible) i can apply it in Configuration > Web > ...
1
vote
1answer
141 views

Magento 2: base URL to use in hardcoded links

I am working on a Magento 2.1.7 shop and I have created a child-theme of Magento Blank. In the back-end, I have created a block with a custom, hardcoded, navigation like: <nav> <ul> &...
1
vote
2answers
558 views

Page display error after changing base url

I am setting up a new Magento 2 store on AWS. After installed M2 on my server (13.210.72.64), the site'base url was 13.210.72.64/magento2 and then I changed it to 13.210.72.64 in the admin panel(...
2
votes
1answer
3k views

SecurityError: Permission denied to access property “tinymce” on cross-origin object

I'm using Magento 1.9.3.4 AND KeyCDN. I configured the js/media/css files to come from CDN. On the CDN I enabled the CORS. The CDN uses HTTP/2, shared SSL and the Origin Shield setting is set to "...
1
vote
1answer
2k views

Magento 2 - The words “admin” and “index” appear twice in the admin URL

I have Magento 2.1.9 installed. After a futile attempt to change the admin URL, it resulted to me not gaining access to the admin panel. After resolving that issue, the admin URL displays like this: ...
0
votes
1answer
394 views

Update Unsecure, Secure, and Cookie URLs in phpMyAdmin from Production to Staging

I'm looking for a way to quickly update all unsecure, secure, and cookie domain URLs through phpMyAdmin. My situation is to change unsecure & secure URLs (I use always-on HTTPS) from ...
3
votes
1answer
123 views

How to add a virtual url in Magento 2

I have the following situation: I have a multiple store views and for one of the store I have let's say this url: wwww.myurl.com. What I try to do, is to change the base url to : www.myurl.com/...
1
vote
1answer
729 views

Programmatically change base url of store

i setup websites / store / storeview in code from controller with this : public function createWebsite($nom, $language){ $code = $this->transformerEnURL($nom); $category = $this-&...
1
vote
1answer
3k views

How to change product URL and redirect?

Here's the situation I need to redirect one of my product to homepage make it as homepage at the same time the URL must be changed to home, so instead of www.example.com/sample-product it should be ...
7
votes
3answers
10k views

Get base url from js file

i want to retrieve a base url and append it with my module controller link from .js file, so it's impossible to use block to get the base url. so far i've done this: define([ 'jquery', 'mage/...
0
votes
1answer
843 views

Add Store Codes to URL

In admin panel under Url options, I want to turn on Store codes on Url, since I want to visit my country-specific pages. I'm running locally (using WAMP) so my IP is 127.0.0.1:8888. I did set my host ...
3
votes
2answers
2k views

Mutiple website with multiple sub domain in Magento 2

I'm trying to implement multiple website in Magento 2.1.3 For that, I have created an extra website store and store view My site URL is like www.example.com My subdomain is www.kw.example.com(where ...
0
votes
3answers
3k views

How to get admin side base url in magento 2?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface'); echo $storeManager->getStore()->...
0
votes
1answer
434 views

How To Test SSL On Development Server Without SSL Certificate [duplicate]

I'm testing some code that changes a link to use the secure base URL, but my development server does not have an SSL certificate. I'm trying to fake it and have so far been unsuccessful. I have links ...
0
votes
1answer
45 views

Magento2: Duplicated stores - base_url problem

We have store Store A installed in public_html/magento2 (available under live.storeAAA.com) We duplicated public_html/magento2 -> public_html/magento_copy So we ended up with 2 folders with exactly ...
0
votes
2answers
1k views

Magento 2 After updating the admin URL getting 404 Not found page

I have changed the admin URL using the below command line: php bin/magento setup:config:set --backend-frontname="admin_path" I have followed the below answer for change the admin URL: How to change ...