Magento 2: Get root path in url, when the domain name doesn't match with magento folder nameHad to restore site, when it came back it has index.php in the urls, how do I get rid of the index.phpHow to restrict user to access website by index.phpHow to get Magento root url properly?How to get site url inside javascript file?Magento 2 Multistore is not working with multi domainGenerate Adminhtml Controller url with get parameter in BlockRun magento extension model inside php scriptMagento 2 : How to get Custom Field Image Icon url from admin catalog category page?Headless Magento 2: Need custom URL instead of domain/products/:SKUCustom script leading to 404 in M2
Can sampling rate be a floating point number?
Why is the result of ('b'+'a'+ + 'a' + 'a').toLowerCase() 'banana'?
80's/90's superhero cartoon with a man on fire and a man who made ice runways like Frozone
How to remove ambiguity: "... lives in the city of H, the capital of the province of NS, WHERE the unemployment rate is ..."?
On math looking obvious in retrospect
Is it okay for a ticket seller in the USA to refuse to give you your change, keep it for themselves and claim it's a tip?
What is this "Table of astronomy" about?
Why does the standard fingering / strumming for a D maj chord leave out the 5th string?
Simplification of numbers
0xF1 opcode-prefix on i80286
Why I have higher ping to the VLAN interface than to other local interfaces
AsyncDictionary - Can you break thread safety?
Heat equation: Squiggly lines
Bitcoin successfully deducted on sender wallet but did not reach receiver wallet
How can God warn people of the upcoming rapture without disrupting society?
is this F 6'9 chord a figured bass or a chord extension?
A continuous water "planet" ring around a star
How to divide item stack in MC PE?
Lengthened voiced stops and the airstream through the nose
Mapping an Aitoff projection onto a sphere
Why is there a large performance impact when looping over an array over 240 elements?
WhatsApp calls on an iPhone and "data" and "minutes"
What is a good class if we remove subclasses?
Annotating a table with arrows
Magento 2: Get root path in url, when the domain name doesn't match with magento folder name
Had to restore site, when it came back it has index.php in the urls, how do I get rid of the index.phpHow to restrict user to access website by index.phpHow to get Magento root url properly?How to get site url inside javascript file?Magento 2 Multistore is not working with multi domainGenerate Adminhtml Controller url with get parameter in BlockRun magento extension model inside php scriptMagento 2 : How to get Custom Field Image Icon url from admin catalog category page?Headless Magento 2: Need custom URL instead of domain/products/:SKUCustom script leading to 404 in M2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have domain name for my magento 2 site something like https://abcxyz.com/index.php, and my project folder name is something like shop.xyz.com (folder name). Now I have added an external file test.php inside magento 2 folder. I want something like https://abcxyz.com/test.php.
How can I get like this in magento header phtml file ?? Thanks for the help in advance.
magento2 php url
add a comment |
I have domain name for my magento 2 site something like https://abcxyz.com/index.php, and my project folder name is something like shop.xyz.com (folder name). Now I have added an external file test.php inside magento 2 folder. I want something like https://abcxyz.com/test.php.
How can I get like this in magento header phtml file ?? Thanks for the help in advance.
magento2 php url
add a comment |
I have domain name for my magento 2 site something like https://abcxyz.com/index.php, and my project folder name is something like shop.xyz.com (folder name). Now I have added an external file test.php inside magento 2 folder. I want something like https://abcxyz.com/test.php.
How can I get like this in magento header phtml file ?? Thanks for the help in advance.
magento2 php url
I have domain name for my magento 2 site something like https://abcxyz.com/index.php, and my project folder name is something like shop.xyz.com (folder name). Now I have added an external file test.php inside magento 2 folder. I want something like https://abcxyz.com/test.php.
How can I get like this in magento header phtml file ?? Thanks for the help in advance.
magento2 php url
magento2 php url
edited Aug 1 at 10:15
Mohit Rane
1,20718 bronze badges
1,20718 bronze badges
asked Aug 1 at 9:17
Dharma TejaDharma Teja
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
- Use Web Server Rewrites: YES
Go to System >> Configuration >> Web >> Search Engines Optimization
- Use secure URL Frontend: YES
Go to System >> Configuration >>Web >>Secure
Flush the cache and check your domain is working without index.php
Note. Check if .htaccess is working or not
Hope this solution will work for you
Thanks, but I want to call test.php file in phtml file, can you please help me out ?
– Dharma Teja
Aug 1 at 9:54
If your magento instance run without index.php then you can access test.php like this - yourdomain.com/test.php
– Mitro
Aug 1 at 10:03
is there a way that without removing index.php can we add test.php ??
– Dharma Teja
Aug 1 at 10:06
You can create index.php instead test.php and put it in some folder name for eg.test and you can access it by domain.com/test in which test is your folder name
– Mitro
Aug 1 at 10:11
So if I remove index.php will domain.com/test.php work ?
– Dharma Teja
Aug 1 at 10:17
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284064%2fmagento-2-get-root-path-in-url-when-the-domain-name-doesnt-match-with-magento%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
- Use Web Server Rewrites: YES
Go to System >> Configuration >> Web >> Search Engines Optimization
- Use secure URL Frontend: YES
Go to System >> Configuration >>Web >>Secure
Flush the cache and check your domain is working without index.php
Note. Check if .htaccess is working or not
Hope this solution will work for you
Thanks, but I want to call test.php file in phtml file, can you please help me out ?
– Dharma Teja
Aug 1 at 9:54
If your magento instance run without index.php then you can access test.php like this - yourdomain.com/test.php
– Mitro
Aug 1 at 10:03
is there a way that without removing index.php can we add test.php ??
– Dharma Teja
Aug 1 at 10:06
You can create index.php instead test.php and put it in some folder name for eg.test and you can access it by domain.com/test in which test is your folder name
– Mitro
Aug 1 at 10:11
So if I remove index.php will domain.com/test.php work ?
– Dharma Teja
Aug 1 at 10:17
add a comment |
- Use Web Server Rewrites: YES
Go to System >> Configuration >> Web >> Search Engines Optimization
- Use secure URL Frontend: YES
Go to System >> Configuration >>Web >>Secure
Flush the cache and check your domain is working without index.php
Note. Check if .htaccess is working or not
Hope this solution will work for you
Thanks, but I want to call test.php file in phtml file, can you please help me out ?
– Dharma Teja
Aug 1 at 9:54
If your magento instance run without index.php then you can access test.php like this - yourdomain.com/test.php
– Mitro
Aug 1 at 10:03
is there a way that without removing index.php can we add test.php ??
– Dharma Teja
Aug 1 at 10:06
You can create index.php instead test.php and put it in some folder name for eg.test and you can access it by domain.com/test in which test is your folder name
– Mitro
Aug 1 at 10:11
So if I remove index.php will domain.com/test.php work ?
– Dharma Teja
Aug 1 at 10:17
add a comment |
- Use Web Server Rewrites: YES
Go to System >> Configuration >> Web >> Search Engines Optimization
- Use secure URL Frontend: YES
Go to System >> Configuration >>Web >>Secure
Flush the cache and check your domain is working without index.php
Note. Check if .htaccess is working or not
Hope this solution will work for you
- Use Web Server Rewrites: YES
Go to System >> Configuration >> Web >> Search Engines Optimization
- Use secure URL Frontend: YES
Go to System >> Configuration >>Web >>Secure
Flush the cache and check your domain is working without index.php
Note. Check if .htaccess is working or not
Hope this solution will work for you
edited Aug 1 at 11:19
Raj Mohan R
1,7973 silver badges13 bronze badges
1,7973 silver badges13 bronze badges
answered Aug 1 at 9:30
MitroMitro
3167 bronze badges
3167 bronze badges
Thanks, but I want to call test.php file in phtml file, can you please help me out ?
– Dharma Teja
Aug 1 at 9:54
If your magento instance run without index.php then you can access test.php like this - yourdomain.com/test.php
– Mitro
Aug 1 at 10:03
is there a way that without removing index.php can we add test.php ??
– Dharma Teja
Aug 1 at 10:06
You can create index.php instead test.php and put it in some folder name for eg.test and you can access it by domain.com/test in which test is your folder name
– Mitro
Aug 1 at 10:11
So if I remove index.php will domain.com/test.php work ?
– Dharma Teja
Aug 1 at 10:17
add a comment |
Thanks, but I want to call test.php file in phtml file, can you please help me out ?
– Dharma Teja
Aug 1 at 9:54
If your magento instance run without index.php then you can access test.php like this - yourdomain.com/test.php
– Mitro
Aug 1 at 10:03
is there a way that without removing index.php can we add test.php ??
– Dharma Teja
Aug 1 at 10:06
You can create index.php instead test.php and put it in some folder name for eg.test and you can access it by domain.com/test in which test is your folder name
– Mitro
Aug 1 at 10:11
So if I remove index.php will domain.com/test.php work ?
– Dharma Teja
Aug 1 at 10:17
Thanks, but I want to call test.php file in phtml file, can you please help me out ?
– Dharma Teja
Aug 1 at 9:54
Thanks, but I want to call test.php file in phtml file, can you please help me out ?
– Dharma Teja
Aug 1 at 9:54
If your magento instance run without index.php then you can access test.php like this - yourdomain.com/test.php
– Mitro
Aug 1 at 10:03
If your magento instance run without index.php then you can access test.php like this - yourdomain.com/test.php
– Mitro
Aug 1 at 10:03
is there a way that without removing index.php can we add test.php ??
– Dharma Teja
Aug 1 at 10:06
is there a way that without removing index.php can we add test.php ??
– Dharma Teja
Aug 1 at 10:06
You can create index.php instead test.php and put it in some folder name for eg.test and you can access it by domain.com/test in which test is your folder name
– Mitro
Aug 1 at 10:11
You can create index.php instead test.php and put it in some folder name for eg.test and you can access it by domain.com/test in which test is your folder name
– Mitro
Aug 1 at 10:11
So if I remove index.php will domain.com/test.php work ?
– Dharma Teja
Aug 1 at 10:17
So if I remove index.php will domain.com/test.php work ?
– Dharma Teja
Aug 1 at 10:17
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284064%2fmagento-2-get-root-path-in-url-when-the-domain-name-doesnt-match-with-magento%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown