After enabling the SSL Magento gives 404 error to internal pages and to css and jshttps to http change url through .htaccess in magento sites except checkout or my account pagegetUrl - getSkinUrl displaying insecure content on HTTPS pagesHow to disable secure url for adminForce HTTPS on all pages in the frontend, not just Checkout/AccountMagento admin failing to load CSS when SSL is activatedAfter Enabling SSL magento still loads default Javascript and CSS files with unsecure URLsHTTPS SSL only on Checkout and Login, Not on all pages on Magento 2Magento 1.9 backend having SSL issue after moving from centos 6 to Debian 8Magento 2.2.5: Admin login page redirect loop 301/302 after installing SSL and enabling HTTPSMagento 2 static files are not being loaded after enabling HTTPS

Supporting developers who insist on using their pet language

Are there J.S. Bach pieces that do not start with the tonic chord?

Doing research in academia and not liking competition

What's the point of this scene involving Flash Thompson at the airport?

What would be the ideal melee weapon made of "Phase Metal"?

What is the German equivalent of 干物女 (dried fish woman)?

Is a public company able to check out who owns its shares in very detailed format?

Extract an attribute value from XML

Does Google Maps take into account hills/inclines for route times?

In which ways do anagamis still experience ignorance?

Is it rude to tell recruiters I would only change jobs for a better salary?

If the derivative of a function is square of it then it is constant

Filtering fine silt/mud from water (not necessarily bacteria etc.)

Do native speakers use ZVE or CPU?

Why limit to revolvers?

Military Weapon System

About the number of real roots

Dropping outliers based on "2.5 times the RMSE"

I quit, and boss offered me 3 month "grace period" where I could still come back

Report how much space is used and available in storage in ZFS on FreeBSD

Was the Ford Model T black because of the speed black paint dries?

Was adding milk to tea started to reduce employee tea break time?

Find the wrong number in the given series: 6, 12, 21, 36, 56, 81?

Players of unusual orchestral instruments



After enabling the SSL Magento gives 404 error to internal pages and to css and js


https to http change url through .htaccess in magento sites except checkout or my account pagegetUrl - getSkinUrl displaying insecure content on HTTPS pagesHow to disable secure url for adminForce HTTPS on all pages in the frontend, not just Checkout/AccountMagento admin failing to load CSS when SSL is activatedAfter Enabling SSL magento still loads default Javascript and CSS files with unsecure URLsHTTPS SSL only on Checkout and Login, Not on all pages on Magento 2Magento 1.9 backend having SSL issue after moving from centos 6 to Debian 8Magento 2.2.5: Admin login page redirect loop 301/302 after installing SSL and enabling HTTPSMagento 2 static files are not being loaded after enabling HTTPS






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I am having a very irritating issue after i enabled the SSL in my website.
I changed the Base URL (Secure) from http to https and I set "Use Secure URLs on Storefront" to YES.
Then I regenerated static content via this command line -:
php bin/magento setup:static-content:deploy -f



And then i cleared my cache. When i see the website it is redirecting to https URL but CSS/JS are not loading and some images are not showing in the Home page.
And none of the links to internal pages are working. But same URL is working with http smoothly.



One more thing i noticed that https URLs are working but when i am adding /index.php after the website URL. This is really strange because all http URL works with URL re-write then why not https URL. To remove /index.php from all URLs i am using this .htaccess from the starts. I am still using .htaccess for that purpose.



RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /index.php [L]


I tried every possible way which are available on the internet. But nothing helps.










share|improve this question
























  • Can you also explain what you have tried?

    – Dominic Xigen
    Jul 5 at 23:53











  • I tried by removing all the contents in generated/ var/cache var/page_cache pub/static folders after then i flushed cache. But it's not working.

    – Shahzad H.
    Jul 6 at 5:00











  • Can you post your full htacess?

    – Dominic Xigen
    Jul 6 at 10:00

















3















I am having a very irritating issue after i enabled the SSL in my website.
I changed the Base URL (Secure) from http to https and I set "Use Secure URLs on Storefront" to YES.
Then I regenerated static content via this command line -:
php bin/magento setup:static-content:deploy -f



And then i cleared my cache. When i see the website it is redirecting to https URL but CSS/JS are not loading and some images are not showing in the Home page.
And none of the links to internal pages are working. But same URL is working with http smoothly.



One more thing i noticed that https URLs are working but when i am adding /index.php after the website URL. This is really strange because all http URL works with URL re-write then why not https URL. To remove /index.php from all URLs i am using this .htaccess from the starts. I am still using .htaccess for that purpose.



RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /index.php [L]


I tried every possible way which are available on the internet. But nothing helps.










share|improve this question
























  • Can you also explain what you have tried?

    – Dominic Xigen
    Jul 5 at 23:53











  • I tried by removing all the contents in generated/ var/cache var/page_cache pub/static folders after then i flushed cache. But it's not working.

    – Shahzad H.
    Jul 6 at 5:00











  • Can you post your full htacess?

    – Dominic Xigen
    Jul 6 at 10:00













3












3








3








I am having a very irritating issue after i enabled the SSL in my website.
I changed the Base URL (Secure) from http to https and I set "Use Secure URLs on Storefront" to YES.
Then I regenerated static content via this command line -:
php bin/magento setup:static-content:deploy -f



And then i cleared my cache. When i see the website it is redirecting to https URL but CSS/JS are not loading and some images are not showing in the Home page.
And none of the links to internal pages are working. But same URL is working with http smoothly.



One more thing i noticed that https URLs are working but when i am adding /index.php after the website URL. This is really strange because all http URL works with URL re-write then why not https URL. To remove /index.php from all URLs i am using this .htaccess from the starts. I am still using .htaccess for that purpose.



RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /index.php [L]


I tried every possible way which are available on the internet. But nothing helps.










share|improve this question
















I am having a very irritating issue after i enabled the SSL in my website.
I changed the Base URL (Secure) from http to https and I set "Use Secure URLs on Storefront" to YES.
Then I regenerated static content via this command line -:
php bin/magento setup:static-content:deploy -f



And then i cleared my cache. When i see the website it is redirecting to https URL but CSS/JS are not loading and some images are not showing in the Home page.
And none of the links to internal pages are working. But same URL is working with http smoothly.



One more thing i noticed that https URLs are working but when i am adding /index.php after the website URL. This is really strange because all http URL works with URL re-write then why not https URL. To remove /index.php from all URLs i am using this .htaccess from the starts. I am still using .htaccess for that purpose.



RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /index.php [L]


I tried every possible way which are available on the internet. But nothing helps.







magento2 magento2.2 ssl js-css






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 6 at 4:56









Kirti Nariya

1,6595 silver badges19 bronze badges




1,6595 silver badges19 bronze badges










asked Jul 5 at 18:15









Shahzad H.Shahzad H.

333 bronze badges




333 bronze badges












  • Can you also explain what you have tried?

    – Dominic Xigen
    Jul 5 at 23:53











  • I tried by removing all the contents in generated/ var/cache var/page_cache pub/static folders after then i flushed cache. But it's not working.

    – Shahzad H.
    Jul 6 at 5:00











  • Can you post your full htacess?

    – Dominic Xigen
    Jul 6 at 10:00

















  • Can you also explain what you have tried?

    – Dominic Xigen
    Jul 5 at 23:53











  • I tried by removing all the contents in generated/ var/cache var/page_cache pub/static folders after then i flushed cache. But it's not working.

    – Shahzad H.
    Jul 6 at 5:00











  • Can you post your full htacess?

    – Dominic Xigen
    Jul 6 at 10:00
















Can you also explain what you have tried?

– Dominic Xigen
Jul 5 at 23:53





Can you also explain what you have tried?

– Dominic Xigen
Jul 5 at 23:53













I tried by removing all the contents in generated/ var/cache var/page_cache pub/static folders after then i flushed cache. But it's not working.

– Shahzad H.
Jul 6 at 5:00





I tried by removing all the contents in generated/ var/cache var/page_cache pub/static folders after then i flushed cache. But it's not working.

– Shahzad H.
Jul 6 at 5:00













Can you post your full htacess?

– Dominic Xigen
Jul 6 at 10:00





Can you post your full htacess?

– Dominic Xigen
Jul 6 at 10:00










1 Answer
1






active

oldest

votes


















0














Your above url rewrite change is for magento 1



For magento 2 it should be just the case of enabling in backend



Stores > Configuration > Web



  • expand the Search Engine Optimization section

  • set Use Web Server Rewrites to “Yes.”

  • When complete, tap Save Config

Your htaccess should look like this



https://github.com/magento/magento2/blob/2.3/.htaccess



Also maybe set all base URLs as https



Other than that are you able to log into admin with secure admin config set?






share|improve this answer























  • Thanks Dominic, I have replaced this .htaccess with my .htaccess in root magento folder. But no changed. Still same issue. I have already "Web Server Rewrite" to Yes. I have only set the Base URL (secure) to https. not the Base URL. My admin URL is set with http so it is working fine. I just need to set https only on the front-end.

    – Shahzad H.
    Jul 6 at 19:58











  • You say you enabled SSL you got and installed a certificate on server? gethttpsforfree.com

    – Dominic Xigen
    Jul 6 at 20:19














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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281008%2fafter-enabling-the-ssl-magento-gives-404-error-to-internal-pages-and-to-css-and%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









0














Your above url rewrite change is for magento 1



For magento 2 it should be just the case of enabling in backend



Stores > Configuration > Web



  • expand the Search Engine Optimization section

  • set Use Web Server Rewrites to “Yes.”

  • When complete, tap Save Config

Your htaccess should look like this



https://github.com/magento/magento2/blob/2.3/.htaccess



Also maybe set all base URLs as https



Other than that are you able to log into admin with secure admin config set?






share|improve this answer























  • Thanks Dominic, I have replaced this .htaccess with my .htaccess in root magento folder. But no changed. Still same issue. I have already "Web Server Rewrite" to Yes. I have only set the Base URL (secure) to https. not the Base URL. My admin URL is set with http so it is working fine. I just need to set https only on the front-end.

    – Shahzad H.
    Jul 6 at 19:58











  • You say you enabled SSL you got and installed a certificate on server? gethttpsforfree.com

    – Dominic Xigen
    Jul 6 at 20:19
















0














Your above url rewrite change is for magento 1



For magento 2 it should be just the case of enabling in backend



Stores > Configuration > Web



  • expand the Search Engine Optimization section

  • set Use Web Server Rewrites to “Yes.”

  • When complete, tap Save Config

Your htaccess should look like this



https://github.com/magento/magento2/blob/2.3/.htaccess



Also maybe set all base URLs as https



Other than that are you able to log into admin with secure admin config set?






share|improve this answer























  • Thanks Dominic, I have replaced this .htaccess with my .htaccess in root magento folder. But no changed. Still same issue. I have already "Web Server Rewrite" to Yes. I have only set the Base URL (secure) to https. not the Base URL. My admin URL is set with http so it is working fine. I just need to set https only on the front-end.

    – Shahzad H.
    Jul 6 at 19:58











  • You say you enabled SSL you got and installed a certificate on server? gethttpsforfree.com

    – Dominic Xigen
    Jul 6 at 20:19














0












0








0







Your above url rewrite change is for magento 1



For magento 2 it should be just the case of enabling in backend



Stores > Configuration > Web



  • expand the Search Engine Optimization section

  • set Use Web Server Rewrites to “Yes.”

  • When complete, tap Save Config

Your htaccess should look like this



https://github.com/magento/magento2/blob/2.3/.htaccess



Also maybe set all base URLs as https



Other than that are you able to log into admin with secure admin config set?






share|improve this answer













Your above url rewrite change is for magento 1



For magento 2 it should be just the case of enabling in backend



Stores > Configuration > Web



  • expand the Search Engine Optimization section

  • set Use Web Server Rewrites to “Yes.”

  • When complete, tap Save Config

Your htaccess should look like this



https://github.com/magento/magento2/blob/2.3/.htaccess



Also maybe set all base URLs as https



Other than that are you able to log into admin with secure admin config set?







share|improve this answer












share|improve this answer



share|improve this answer










answered Jul 6 at 10:06









Dominic XigenDominic Xigen

2,8201 gold badge4 silver badges16 bronze badges




2,8201 gold badge4 silver badges16 bronze badges












  • Thanks Dominic, I have replaced this .htaccess with my .htaccess in root magento folder. But no changed. Still same issue. I have already "Web Server Rewrite" to Yes. I have only set the Base URL (secure) to https. not the Base URL. My admin URL is set with http so it is working fine. I just need to set https only on the front-end.

    – Shahzad H.
    Jul 6 at 19:58











  • You say you enabled SSL you got and installed a certificate on server? gethttpsforfree.com

    – Dominic Xigen
    Jul 6 at 20:19


















  • Thanks Dominic, I have replaced this .htaccess with my .htaccess in root magento folder. But no changed. Still same issue. I have already "Web Server Rewrite" to Yes. I have only set the Base URL (secure) to https. not the Base URL. My admin URL is set with http so it is working fine. I just need to set https only on the front-end.

    – Shahzad H.
    Jul 6 at 19:58











  • You say you enabled SSL you got and installed a certificate on server? gethttpsforfree.com

    – Dominic Xigen
    Jul 6 at 20:19

















Thanks Dominic, I have replaced this .htaccess with my .htaccess in root magento folder. But no changed. Still same issue. I have already "Web Server Rewrite" to Yes. I have only set the Base URL (secure) to https. not the Base URL. My admin URL is set with http so it is working fine. I just need to set https only on the front-end.

– Shahzad H.
Jul 6 at 19:58





Thanks Dominic, I have replaced this .htaccess with my .htaccess in root magento folder. But no changed. Still same issue. I have already "Web Server Rewrite" to Yes. I have only set the Base URL (secure) to https. not the Base URL. My admin URL is set with http so it is working fine. I just need to set https only on the front-end.

– Shahzad H.
Jul 6 at 19:58













You say you enabled SSL you got and installed a certificate on server? gethttpsforfree.com

– Dominic Xigen
Jul 6 at 20:19






You say you enabled SSL you got and installed a certificate on server? gethttpsforfree.com

– Dominic Xigen
Jul 6 at 20:19


















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281008%2fafter-enabling-the-ssl-magento-gives-404-error-to-internal-pages-and-to-css-and%23new-answer', 'question_page');

);

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







Popular posts from this blog

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form