Questions tagged [htaccess]

Denotes questions related to htaccess. A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, used for configuration of site-access issues, such as URL redirection, URL shortening, Access-security control (for different webpages and files), and more.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

Redirect storeview urls with diffrent domain

I would like to redirect some of my store urls for better SEO. i have 5 storeviews and all of them have diffrent domains. Example www.example.de www.example.eu www.example.fi etc. I tried redirecting ...
0
votes
1answer
33 views

How to increase max upload image size to 16M in Magento 2?

I modify the field values upload_max_filesize = 20M ,post_max_size = 20M and memory_limit = 2048Min the PHP.ini file of the server. I have to upload the banner images up to 16MB on the website but it ...
0
votes
0answers
19 views

Magento adding .html in the middle of url after last category

I migrated all my products and categories (thousands) over from M1 to M2 and persevered all the URL writes. I have now found that if we modify a category in M2 it is adding a .html to the end of the ...
0
votes
0answers
10 views

URL rewrite having query string via htaccess in magento 2

I have current URL like this: http://localhost/projectname/industries/index/index/industry/aircraft (Here industries is the frontend route, index is controller and second index is action industry is ...
0
votes
1answer
289 views

Magento 2.4.2 on subfolder with Apache

Magento with 2.4.2 changed the location of the root and the index.php by set everything inside the pub folder. This causes a 404 problem in the case magento is not in the docroot and I cannot resolve ...
0
votes
0answers
25 views

Magento URL Rewrite - Extract match string and redirect to new path

I have URL For example mydomainname/dir1/dir2/dir3/dir4/abc.jpg I want to redirect dynamically to all matching URL mydomainname/dir4/abc.jpg //Want extract some part and redirect to reaming part of ...
0
votes
1answer
88 views

Error redirected you too many times upon trying to install Magento 2.4

I just downloaded latest version of Magento 2.4 and I am trying to install it on Namecheap hosting but upon entering the URL of my website in the browser to start the setup wizard, it keep re-loading. ...
1
vote
1answer
158 views

Magento2.4.2 multi website setup not working

I have upgraded the Magento version from 2.3.3 to M2.4.2 now the main example.com working fine and example.com/wholesale | example.com/retail not working. I have copied .htaccess from pub to these ...
0
votes
1answer
444 views

Apache configuration file for Magento 2.4

I have installed Magento 2.4 on Apache 2 sever running on Ubuntu 20.x When I try to load the magento root directory on browser, I get Not Found The requested URL was not found on this server. I have ...
0
votes
2answers
81 views

/index.php/rest/V1/modules File not found after upgrading to magento 2.4.2

after upgrading to 2.4.2 there is a problem with rest api the url /index.php/rest/V1/modules responds with "File not found" the url /rest/V1/modules works well https://magento-560832-1812590....
0
votes
2answers
826 views

The requested URL /pub/ was not found on this server. - Magento .htaccess problem

I have an problem about magento 2.4.2 Installed magento 2.4.2 using Composer-CLI. But I can't access magento homepage (http://localhost:8888/magento2) The requested URL /pub/ was not found on this ...
0
votes
1answer
30 views

Magento 2 - Set the maintenance mode with the custom page

I am about to make a server switch for my site https://www.magento2.com from Apache to Nginx and during for this operation i want set up maintenance mode. The server where I want to set up this mode ...
0
votes
2answers
35 views

How to redirect domain.com to www.domain.com?

I have this code in .htaccess Options +SymLinksIfOwnerMatch RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] But it still appears ...
0
votes
0answers
57 views

Magento 2.4 500 Error On Fresh Install

I have just installed a clean instance of Magento 2.4 running on PHP 7.4.9 and I am getting a 500 error when trying to access the index file to connect the database and compete the install. I have ...
0
votes
3answers
37 views

Magento 2.3 Site Unwanted Redirect

My Magento 2.3 site is redirecting and I am unsure why. When I access the domain, it redirects to domain.com/Industrial%20Cleaning%20Products. I have done the following to try and rectify the issue: ...
0
votes
0answers
51 views

Magento 2 How to fix Error site has been blocked by CORS policy

I have Developed a custom API its working fine in Postman, but its not working in another platform. How to fix this issue. I tried by updating root .htaccess RewriteEngine on RewriteCond %{...
0
votes
0answers
22 views

How to proxy media folder to live site

I'm working on a Magento site locally and would like to see the media folder contents to get a good representation of how the website looks. But the media folder is 124GB. For local development I'd ...
0
votes
0answers
47 views

Magento 2 Which .htaccess file to use for mod_expires.c (Leverage Browser Caching)?

In Magento 2 there are many .htaccess files in different locations. If I want to add the below code to my .htaccess file to increase the Leverage Browser Cacheing score, in which specific .htaccess ...
0
votes
0answers
10 views

Installing magento2 ina subdirectory give me eternal loops in the admin

How can I have magento2 in a subdirectory in a reseller with cpanel. I have the domain pointing public_html but my magento instance have to be in public_html/src I put the following code in the ....
1
vote
1answer
71 views

Cannot whitelist htaccess blocked admin URL

Trying to whitelist the blocked admin URL for the outside world from htaccess but not working. The below code worked in Magento 1. I have added this in my root_directory/pub/.httaccess. RewriteCond %{...
0
votes
1answer
29 views

Block traffic from USA but allow Google, Bing bots and Facebook catalogue uploads

I recently suffered 2 credit card attacks on my live site with traffic on the first attack coming from Singapore and on the second it came via the USA from someone in Vietnam. By card attacks I mean ...
0
votes
1answer
312 views

rewrite query string via htaccess

I want to rewrite some dynamic urls like: https://www.test.com/my-custom-url.html/?o=price&dir=asc&new=1 to https://www.test.com/my-custom-url.html/o/price/dir/asc/new/1 Thanks.
0
votes
1answer
135 views

For Magento2 how to apply a redirect rewrite in .htaccess file for all URL's from .html to /

For Magento2 how to apply a rewrite in .htaccess for all URL's from .html to / URL structure. The M1 store has .html as the end, the new M2 store has / as the URL ending for all products and ...
0
votes
1answer
157 views

Magento 1.9 webp images rewrite htaccess

I can't figure out why my htaccess won't rewrite urls to webp images, only images that are on skin directory get served as webp. https://domain/skin/frontend/theme/test/images/image.png will be ...
0
votes
1answer
76 views

Magento2 images not loading

I am new to magento, I am building a store in this I have deployed the site in the domain.com/shop subfolder, now the problem is that the images are not loading in my site, I think it is due to ....
0
votes
1answer
118 views

How to remove trailing slash adding in pagination urls

I have added code in my htaccess to add trailing slash in my Magento 2.3.2 website URLs. I want to exclude the pagination pages including questions to add a trailing slash. For example - I have ...
1
vote
2answers
75 views

Magento2 .htaccess

I want to redirect another url. https://example.com/store1/lstoreviewcode/ https://example.com/store2/cstoreviewcode/ to replace with https://example.com/store1/storeviewcode/ https://...
1
vote
1answer
459 views

How to improve Magento performance by eliminating Apache .htaccess files?

Our setup is a Magento 2.3.3 store running on a dedicated (not shared) Linux host. We have full root access and can edit files as needed. The httpd server is Apache 2.4.41. We have read several good ...
1
vote
0answers
39 views

Magento2 Seller Sub Domain Configuration

We are using multivendor marketplace in magento2. Now i we have login for seller as http://mystore.com/marketplace/vendor/login , I want to make it as seller.mystore.com that means when ever seller....
1
vote
3answers
75 views

Magento 2 Unable to redirect http to https when using multistore

I am unable to redirect HTTP to https when using a multistore option. Anyone else using more than one store and has the http->https auto redirection working from .htaccess?
0
votes
1answer
47 views

Magento 1.9.x migration on VPS error 403

I have to migrate the site in magento 1.9.4.3, multilingual, from shared hosting to VPS. On shared hosting I use cPanel, while on VPS I will use Plesk. After a successful transfer trial I realized an ...
0
votes
1answer
220 views

How to remove .html suffix?

I have a running store with around 600 products and wanted to remove the HTML suffix from my URLs. I removed the HTML in the config and reindexed. All HTML pages are being redirected to the non-HTML ...
1
vote
2answers
673 views

"ERR_TOO_MANY_REDIRECTS" when turn on Cloudflare CDN possible .htaccess file issue

When I tried to turn on Cloudflare CDN, my site will get "ERR_TOO_MANY_REDIRECTS" error page (the site loads fine if I don't turn on Cloudflare CDN). I checked with the hosting provider, seems like ...
1
vote
0answers
56 views

pub/static/.htaccess being ignored

Ive just started working on a Magento 2 site (2.1.9) and trying to add a 301 rewrite to pub/static/.htaccess so that when someone enters an old URL with index.php it removes the index.php with a 301 ...
0
votes
1answer
152 views

Forbid access to a file by url but allow through browser

how can I prevent the user to access my /v folder in my website where I have some video, but allow them to be display on frontend thanks to the <\video> tag from HTML 5 ? I tried this and other ...
1
vote
1answer
275 views

Error 552 Disk Quota Exceeded - But it is not

I needed to add a line of code to my htaccess file so I downloaded it by FTP using Filezilla to my local machine I now see that the size of the htaccess file on the server is now 0 while the one I ...
0
votes
1answer
48 views

Htaccess file erased

I needed to add a line of code to my htaccess file so I downloaded it by FTP using Filezilla to my local machine I now see that the size of the htaccess file on the server is now 0 while the one I ...
0
votes
1answer
2k views

Magento 2 : Mixed Content Error Block HTTP Request an HTTPS page

When I call the third party HTTP URL in my page. Then, I face the below error. How can I solve it? Mixed Content: The page at 'https://*******************' was loaded over HTTPS, but requested an ...
0
votes
1answer
127 views

How to redirect subdomain to subdomain?

I have a question for config url rewrite on .htaccess file. On my store have two language is English and German. I setup English with domain main.cocal and German is de.main.local. so for now I want ...
2
votes
0answers
54 views

www.domain.com/pub/ shows the web page without css/javascript loaded

I can access my site correctly like www.domain.com ( with all the content loads correctly), but if I type in www.domain.com/pub/ it is still accessible ( without js & css loaded). How do I fix ...
2
votes
0answers
232 views

Removing AMP Pages from Magento

Google AMP is a massive failure. I have seen my engagement and click rates all go down atleast 30% across all my sites, and one site is down 50% from when I installed AMP. I have it now for 7 months ...
1
vote
2answers
55 views

Magento 2.1 Redirect through htaccess

I am unable to 301 redirect URL like baseurl/blog/international%20enviroguard%20re-branding%20-%20faqs/ to baseurl/blog/international-enviroguard-re-branding-faqs through htaccess. The page is ...
2
votes
0answers
73 views

Magento 2 EE remove url trailing slash through htaccess

I am using below code in htaccess to remove trailing slash in urls. But after adding this code my admin panel stops working and shows error - Too many redirects. I don't know whether to place this ...
0
votes
0answers
46 views

Want to show the Stores based on countries

I need to show the stores name like saudi / oman / dubai. Each stores have two store views (Arbic & English). I want to display these Stores according to their countries. For Example Saudi ...
1
vote
0answers
144 views

Magento 2 - how do i redirect "mydomain/pub" and "mydomain/pub/media" path to homepage?

I'm trying to redirect "mydomain.com/pub" and "www.mydomain.com/pub/media" to homepage (mydomain.com). Currently, "mydomain.com/pub" path shows the homepage with no css and js loaded, and "www....
0
votes
1answer
840 views

Why Magento2 not loading css and js files in local setup?

my root folder .htaccess file RewriteOptions inherit # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php71” package as the default “PHP” programming language. <IfModule ...
0
votes
2answers
658 views

Rewrite URL using GET params

I have a URL that looks like this: site.local/wheel-tyres/tyres.html?find=aprilia-af-1-futura-1989-4729&sid=T80yDaUX1a I'm trying to get it to look like this: site.local/wheel-tyres/tyres/...
0
votes
0answers
177 views

Access Magento Admin on Subdomain

I have a running store on Magento 2 which has multiple websites that I can access in the front end without any problems, for example: https://siteone.mymagestore.com https://sitetwo.mymagestore.com ...
0
votes
2answers
1k views

Magento 2.2.x 500 internal server error upon installation

I have just installed magento 2.2.4 on my cPanel and I got internal server error 500. I tried to rename .htaccess file but then it opens with no css and its admin gives 404 error. My cPanel uses PHP 7....
0
votes
1answer
123 views

other website/store/store front does not load; .htaccess file is missing

Magento 1.9.1 Porto theme My hosting company created a new account for me and moved my existing account there. That replaced the broken cPanel account and I am now able to access the database via the ...

1
2 3 4 5