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
1answer
24 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
29 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
45 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
68 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
21 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
40 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
34 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
25 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
45 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 ...
0
votes
0answers
23 views

Magento 1.9.3.4 Multistore setup, close one store and redirect to another..?

I'm in need of some advice, I have a Multistore setup with 4 store views running under toplevel domains this is part of my index.php $currwebsite = "eng"; /* THis is my www.website.com domain with 3 ...
1
vote
2answers
122 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 ...
0
votes
0answers
24 views

index.php rewrite 301 is affecting payments

I've created a htaccess in the root directory to remove index.php from URLs but excluded the user/admin areas. RewriteEngine On RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ ...
1
vote
0answers
24 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
0answers
453 views

Refused to display in a frame because an ancestor violates the following Content Security Policy “frame-ancestors”

I added an iframe into checkout page to make in site payments but magento blocks iframe and shows blank content... I tried to put Header set Content-Security-Policy "frame-ancestors https://redsys....
0
votes
0answers
105 views

Need to create custom error pages (500, 503) for Magento 2

I want to create custom error pages for HTTP Responses of 500, 503, etc. in a Magento 2 project. After turning on "ProxyErrorOverride" from the virtual host, I found that we can use the below code in ...
0
votes
0answers
115 views

magento 2.3 issue after adding trailing slash in htaccess

I have added below code to add trailing slash at the end of cms pages in htaccess of our magento 2.3.2 website. RewriteCond %{REQUEST_URI} !^/robots.txt/* RewriteCond %{REQUEST_URI} !\.(php|...
0
votes
1answer
49 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
56 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
24 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
236 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
77 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
40 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
50 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 ...
0
votes
0answers
34 views

How can i do absolute path redirect on magento

How can I do in magento 2.2.4 modify the full URL? I want to do a 301 redirect I mean I want to redirect the following URL for example https://google.com/US and the redirect is https://googleguest....
1
vote
2answers
36 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
36 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
31 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
70 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
247 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
358 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
98 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
850 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
62 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
373 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
256 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
244 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
302 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
180 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.
2
votes
1answer
183 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
28 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
283 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
1k 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
0
votes
4answers
2k 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 ...
0
votes
0answers
53 views

XML sitemap redirects to HTML sitemap after change

I have a strange issue where when you visit www.website.com/sitemap.xml or www.website.ca/sitemap.xml, it shows the sitemap as an html page. The following has been added to my .htaccess : #Sitemap: ...
0
votes
3answers
2k views

Magento 2.2 .htaccess issue

I am just migrating my site from wwww.example.com to www.example.com/demo. Now problem is that CSS is not loading and any URL does not work. Please let me know if any issue in the .htaccess. #########...
0
votes
1answer
717 views

401 unauthorized due to directory protection on magento 2 project

Is there a way to pass basic authorization and bearer authorization in postman for accessing Magento 2 rest api's. I have defined the directory protection using .htaccess and .htpassword. For getting ...
0
votes
1answer
753 views

How to secure Magento 2 dev site using .htaccess

Previously using Magento 1 I have been able to secure dev sites easily using a .htaccess / .htpasswd setup. It's just to keep the site from being viewed before it's ready. However the same setup in ...
0
votes
1answer
225 views

Help for redirect all default page magento to 404 or homepage with .htaccess

I'am on magento 1.9.3.8, i know it would be time for me to go on magento 2... So i have this url by default in magento : downloader/ catalogsearch/advanced/ catalog/seo_sitemap/product/ catalog/...
1
vote
1answer
3k views

How to add 301 redirection rule magento2?

How to add 301 redirections for the base URL in Magento 2.1 via .htaccess. http://www.example.com/ http://www.example.com http://example.com http://example.com/ https://example.com http://...

1
2 3 4 5