Questions tagged [index.php]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
0 answers
231 views

Matching CLI Bootstrap Params to pub/index.php's Bootstrap Params

Magento 2 has, infamously, two index.php files. The first is in the root folder index.php the second is in a pub folder pub/index.php A Magento developer needs to chose which file they're going ...
Alana Storm's user avatar
  • 44.4k
2 votes
2 answers
184 views

Update to 2.4.5-p1 deleted Php files in Pub Folder

I recently updated a local Shop to 2.4.5-p1. The update seems to have deleted all contents from my [Mageroot]/pub folder except for sub-folders. Notably this affected index.php. Is there any way to ...
Hurrpadurr's user avatar
2 votes
1 answer
701 views

Change Magento 2 website based on IP

I have 3 websites in my current Magento installation and are as follows website1 Code: base, website2 Code: au, website3 Code: ca. Each website has one store and one store_view except for website3 ...
Reshad Zazai's user avatar
1 vote
0 answers
176 views

Website not found -> 404 on each page including admin

I have just cloned a Magento website to my local environment and the website showing 404, regardless what page I visit even the admin panel is 404. I am using Magento 1.9.3.8 and running it on MAMP 5....
Pav's user avatar
  • 11
1 vote
4 answers
320 views

How can i remove index.php from Categories URL & Products URL? [duplicate]

In my base url not have index.php, but my all categories and products url consists index.php. How can i remove this. Note : Base url have not index.php
zus's user avatar
  • 165
0 votes
1 answer
260 views

BP Constant in index.php

I'm looking through index.php in the root directory of Magento and there is a Constant name BP which is defined in app/autoload.php. I can't see how index.php can see this Constant as there is no link ...
Eddie's user avatar
  • 139
0 votes
3 answers
2k views

Print the index.php code instead of execute in magento 2

I have installed magento 2 in my ubuntu and I tried to run magento setup, it print the index.php code. Help me.
Sakthivel's user avatar
  • 145
0 votes
1 answer
70 views

Strip index.php from rest urls

I am having this issue with an external platform which trying to get rest urls from my magento 2.4.5. Issue is that the urls they hit contain index.php inside. They are like this: https://example....
G. G.'s user avatar
  • 1,132
0 votes
1 answer
617 views

Magento 2 how to create custom index.php and pass store code programmatically?

I have a multi-vendor e-commerce platform, everytime I create a new store I need to create a folder for the store and include an index.php for example: var/www/html/magento/stores/store2/index.php ...
Oscar Vazquez's user avatar
0 votes
1 answer
124 views

Whys is there an exit() directive at the beginning of my pub/index.php

Here is the code of the pub/index.php: error_reporting(E_ALL); ini_set('display_errors', 1); use Magento\Framework\App\Bootstrap; use Magento\Framework\App\Filesystem\DirectoryList; exit(); try { ...
Vincent Teyssier's user avatar
0 votes
1 answer
4k views

Uncaught RuntimeException: ObjectManager isn't initialized in vendor\magento\framework\App\ObjectManager.php on line 31

I am trying to write some business logic root folder of index.php file, but it's throwing below error. Uncaught RuntimeException: ObjectManager isn't initialized in vendor\magento\framework\App\...
Bojjaiah's user avatar
  • 4,002
0 votes
2 answers
42 views

index.php is on main url after last update

After we did the last update to Magento our homepage url went from https://dutchmanaxles.com to https://dutchmanaxles.com/index.php This only appears on the main page, and we have done all the ...
Daniel Linnan's user avatar
0 votes
1 answer
63 views

My magento Redirecting on live site [duplicate]

I have One wholesaler folder in magento root in which one index.php file in that file i found this code /** * Compilation includes configuration file */ $compilerConfig = 'includes/config.php'; if (...
Jaimin's user avatar
  • 2,146
0 votes
1 answer
406 views

PHTML to PHP for PDF print out purpose

I have some difficulties to convert some phtml codes into php (note: simple conversion with online tools html to php does not work therefore please do not answer if it is to refer online tool). Below ...
Joel's user avatar
  • 33
0 votes
1 answer
89 views

Disable URL rewrite for specific URL

I have the ShipStation extension installed in my Magento store (v2.4.4), and I'm having a problem with the APIs. ShipStation tries to connect at www.mystore.com/index.php/api/auctane, but with with ...
Swappart's user avatar
0 votes
2 answers
44 views

in my url the index.php path appears

my current path ` http://magento2/index.php/router/controller/action preface this address (index.php) is added to the line after the redirect, but there is no error I didn't do anything to make it ...
esca7a's user avatar
  • 21
0 votes
1 answer
39 views

Homepage Routing when using multiple domains per Website

I currently run a Magento 2.3.3 multisite installation with the following example of index.php switch($_SERVER['HTTP_HOST']) { case 'DOMAIN-A.co.uk': case 'www.DOMAIN-A.co.uk': case 'DOMAIN-A....
Duncan Wardlaw's user avatar
0 votes
1 answer
126 views

GeoIP issue when automatically setting storeview in Magento 2 (`geoip_country_code_by_name` function)

In order to automatically switch store views depending on a user's location we have decided to add the code provided here:Magento 2 pragmatically set storeview to ourindex.php file as shown below: <...
Alex B's user avatar
  • 101
0 votes
2 answers
946 views

Magento 2: Multistore with the same domain

I want to have many sites with the same domain, for example, example.com/site1, example.com/site2, and so on... This is what I've done by far: 1- Change base URL of the site for example.com/site1 2-...
Oscar Vazquez's user avatar
0 votes
0 answers
247 views

Configuring Magento 2.2.7 document root to pub

In relation to this earlier question at Difference between root index.php and pub directory index.php in Magento2? I'm using a cPanel hosted domain and am wondering if I should just set the document ...
Alex Lim's user avatar
0 votes
1 answer
318 views

Remove index.php from magento url in sitemap.xml

We have removed the annoying index.php from all of our urls in magento 1.9.3.8 and the frontend is working beautifully (server rewrites and htaccess properly set up etc.). However, our sitemap.xml is ...
user61941's user avatar
0 votes
1 answer
2k views

Two entry point: index.php and pub/index.php

I am facing the problem of having two entry points to Magento2 index.php and pub/index.php. I want to add another DIR called "pub", add this to the document root load and test it. Currently it is: ...
Deadulus's user avatar
  • 245
0 votes
1 answer
527 views

Magento 1.9.0.1 - Can only access admin panel using htttp://domain.com/index.php/admin

I am struggling to find a solution to this problem the site in question http://vvspris.no can only grants access to the admin panel if i use "index.php" between the url and admin panel name i.e ...
c2aFrederick's user avatar