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
17 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
12 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
6 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 ....
0
votes
0answers
7 views

404 redirect for my website using htaccess not working for new pages with “?”

How can I redirect my 404 pages with Magento? I try to change my site
1
vote
1answer
21 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
0answers
18 views

Magento 2.3 multilanguage error 404 with folder named as language suffix

Magento 2.3.5 multilingual site hosted on vps with plesk, I would like to create folders where to save the sitemaps of the site, where each folder must have the suffix of the language as its name. But ...
0
votes
1answer
22 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
28 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
21 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
0answers
62 views

What does “ExpiresByType text/HTML A0” and “ExpiresByType text/plain A0” on Magento htaccess file?

I want to activate the browser cache, for now here is my code: <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "...
0
votes
1answer
27 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
0answers
11 views

Magento 1 does not generate cache in the subdomain

I moved the media, skin and js folders to the subdomain of my site. So now the resources in magento are called with this address: subdomain.mysite.com Everything works and the addresses are taken ...
0
votes
1answer
41 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
68 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
58 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
191 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
25 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
45 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
42 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
0answers
40 views

Magento 2 - ERR_TOO_MANY_REDIRECTS on Frontend - Sporadic

I am facing an issue where the storefront throws ERR_TOO_MANY_REDIRECTS error once or twice a day. It does not follow any specific time pattern. To fix this, all we are doing is to just refresh FPC ...
0
votes
1answer
115 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
301 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
42 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
92 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
131 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
34 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
701 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
96 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
45 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 ...
1
vote
0answers
97 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
39 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
47 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
37 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
83 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
477 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
494 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
129 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
935 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
75 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 ...
0
votes
1answer
811 views

1.9 - Setting up multi-website using subdomain

So I'm attempting to setup a second website under Magento, and I'd like it to be on a subdomain, for example, second.mywebsite.com. My main store is mywebsite.com. I've essentially got everything ...
0
votes
1answer
327 views

No Forward Slash on URL redirects back to Homepage

We've got a strange issue with a Magento 1.9 install where any page that you try and navigate to that doesn't have a slash on the end of the URL is automatically redirect back to the homepage. Our ...
0
votes
1answer
315 views

Apache 404 Error for url redirect for files in pub static folder

I am having problem with my setup in local and live, when I try to hit a url that dd not exist in : pub/static/frontend/XXX/default/ folder it gives me apache 404 error. I have my alias or domain ...
2
votes
1answer
406 views

Same Magento 2 htaccess file but different results on local machine and live server

I am running Magento 2.1.14 and have a version installed on my local machine as well as a live server. Both machines are running Apache 2.2. On my local machine I installed php 7.0.31 and on the ...
2
votes
2answers
230 views

How to restrict direct access `/pub` with url?

How to restrict direct access /pub with the project URL (www.domain.com/pub) in Magento 2.
3
votes
1answer
229 views

WordPress installation under subdirectory all pages except gives 404

I have a Magento installation in base directory and WordPress installation in my sub directory. When I open the home page of WordPress it opens normally but when I go to any sub-page/post of WordPress ...
1
vote
0answers
38 views

Are the Magento 2.1.14 rewrite rules in htaccess file working properly?

In the default htaccess file in Magento 2.1 there are some RewriteCond's and RewriteRule's that are explained in the htaccess.sample file that comes with Magento 2.1. never rewrite for existing files,...
0
votes
1answer
25 views

301 htacces doesnt work on Magento 2

I place my code at the top of htacces, but it doesn't work. What did i do wrong? # Redirect [CODE] [OLD PATH] [NEW PATH] RewriteEngine On Redirect 301 /sieraden /dames/dames-accessoires.html page: ...
1
vote
1answer
332 views

How to host downloadable ZIP file?

I have a ZIP file. I want it so when a user clicks a link on a page, it will download the ZIP file. I have the ZIP under pub/media/downloadable and inside there's a .htaccess file, and currently this ...
2
votes
5answers
2k views

How to remove index.php from url if we enter manually

How to remove index.php when we enter manually in the URL My store path is /var/www/html/testfolder/ Thanks
1
vote
4answers
3k views

How to remove trailing slash from Magento 2 url

I have installed ssl in my Magento 2 store and configured base url to the https version. But when accessing http version, Magento redirecting url with appending trailing slash. For example: My ...

1
2 3 4 5