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.

78 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
615 views

Case insensitive product urls

Does anyone have a good solution for making magento products' URLs case insensitive? Obviously I've looked into: <IfModule mod_speling.c> CheckCaseOnly on CheckSpelling on </...
2
votes
0answers
34 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
33 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 ...
2
votes
1answer
121 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 ...
2
votes
2answers
67 views

How to rewrite magento website to new domain

I have magento website in custom.com domain, and now I want to access complete frontend website content from one more domain also says custom1.com. Admin url will be same as custom.com/admin. I have ...
2
votes
0answers
152 views

redirect htaccess from lowercase letters to uppercase magento using .htaccess

redirect htaccess lowercase to uppercase after http://example.com/catalogsearch/result/?q= From: http://example.com/catalogsearch/result/?q=apple To: http://example.com/catalogsearch/result/?q=...
2
votes
0answers
27 views

Magento 1.9 - how to set rules to invalidate old “version numbers” for the cache’s store on the client’s local computers

I have been suffered from users on my website couldn't see the update because of cache. On searching on Google, most of posts are noted like just flushing cache on back-end site and via FTP. Btw even ...
2
votes
0answers
322 views

Configuring multi store backend magento 2

So this is the problem I'm having. 1) I created the website, store and store view. 2) In the index.php file I have put the following code: $params = $_SERVER; $params[\Magento\Store\Model\...
1
vote
0answers
21 views

Magento 1.9 two domains for one store, different language

I have a problem with Magento 1.9. I have two domains. One for polish language and one for the English language. I want to have polish version when I go to mydomain.pl and English version on mydomain....
1
vote
1answer
25 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 ...
1
vote
0answers
29 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
34 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 ...
1
vote
0answers
55 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....
1
vote
0answers
23 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,...
1
vote
1answer
25 views

Add second store to magento 1.8

I'm trying to add a second store to my existing Magento installation (1.8.1.0). The existing instance sits on https://subdomain1.url.com, Within Magento, website code is base, store view code is ...
1
vote
0answers
189 views

htaccess Rewrite Rules for Magento Multisite with WordPress blog

I have a Magento installation running 2 websites: www.mywebsite1.co.uk www.mywebsite2.co.uk We had a blog extension that was used, however now we've switch the blog on mywebsite1.co.uk to WordPress. ...
1
vote
0answers
287 views

Magento 2.1: Modifying root .htaccess for URL rewrite rules

Attempting to add some rewrite rules to the root .htaccess for my Magento 2 installation, but additions to that file are not reflecting. What I want to achieve is to create two rewrite rules. One for ...
1
vote
0answers
268 views

Magento 1: Move Domains to subfolder

I have a multi-store setup with the german domain running on .de and the english on .com. Now I need to move them both together to the .com domain utilizing the store codes in the urls. www.example....
1
vote
0answers
305 views

Force api connect HTTP not HTTPS

I have a problem with forcing http for my api call external program (cant edit it) connects with api using http. curently i have enabled https and api doesnt connect with external server anymore. ...
1
vote
1answer
914 views

Magento2: Different domain for each store view

I'm struggling to get my magento2 website set up on different domains for each storeview and was wondering whether anyone could please advise how I can get this working? I've created my store views ...
1
vote
1answer
426 views

Magento Redirects To Homepage When Not Adding HTTPS

Recently we made a change to our domain to force WWW and HTTPS. However, I notice now if I type a url without the https it redirects to homepage. Is this something that can be fixed in .htaccess? ...
1
vote
0answers
110 views

Issue with Multi Store setup - New NZ site does not load the right store

I have a staging environment using Magento 1.9.2.4 Community, where I want to set up an additional New Zealand store. The site which redirects to the magento site is not loading the New Zealand store, ...
1
vote
1answer
818 views

Help me on CORS Access Control Allow Origin

I have one domain having mywebsite.com and there would be multiple subdomains like subdomain.mywebsite.com , subdomain1.mywebsite.com , subdomain2.mywebsite.com and so on. In htaccess file I have ...
1
vote
0answers
69 views

2.1.3 installation returning 404 on admin

I just finished installing, was given the sucess page, clicked on the link do admin and I get a 404 page. When I go to the home page, there's a bunch of plain html with no CSS or JS working. It looks ...
1
vote
0answers
65 views

How avoid user authentication for one single url in htaccess?

SetEnvIf Request_URI "^/wp-content*$" AdminUri AuthUserFile /public_html/.htpasswd AuthType Basic AuthName "My Secret Folder" Require valid-user I set up authentication in my site as above. I ...
1
vote
0answers
43 views

Is possible Identify accessed page before page 404?

I have a new Magento store (version 1.9.3.1), I have already checked all the links and all are working normally, however in Google Analytics there are many hits that are causing the 404 error, I ...
1
vote
0answers
44 views

htaccess redirect, assist please

What i am trying to do is rewrite some URLs and apply SSL on certaing pages on my site. This is the code that i have: RewriteEngine on RewriteBase / RewriteRule ^mylogin$ index.php?view=...
1
vote
0answers
683 views

Implimenting a Content Security Policy Magento 1.9.x

I'm looking to improve the security of my site with a Content Security Policy. I have set one up for my site in htaccess (using Content-Security-Policy-Report-Only and doing everything possible to ...
1
vote
0answers
332 views

Magento 1.7 how to rewrite a URL with special characters in such as %20 etc

Someone at the company I work for has added a product in Magento and created a terrible URL with 's and spaces in. They must have entered the product name in the URL field. The URL looks like this: /...
1
vote
0answers
65 views

Subfolder as Magento storeview

I am trying to access a store view in Magento 1.9.1.1 from a subfolder. I have: www.webshop1.nl => store_1 + default www.webshop2.nl => store_2 + storeview_NL www.webshop2.nl/en => store_2 +...
1
vote
1answer
1k views

How to prevent duplicate content issues caused by index.php in urls?

I've been trying to prevent our homepage from displaying as both www.domain.co.uk & www.domain.co.uk/index.php but now i've realised that every other page displays with /index.php in the url. ...
1
vote
0answers
41 views

Magento 1.8 - Very strange issues with redirects caused by our hosts tech support team

We asked our hosts tech support to change the 302 redirects to 301's...after numerous attempts by them i gave up on them and accepted that they could not do it. Now they have left us where none of ...
0
votes
0answers
16 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$ ...
0
votes
0answers
15 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
23 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
38 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
33 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
21 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 ...
0
votes
1answer
18 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
57 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
0answers
18 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....
0
votes
0answers
25 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 ...
0
votes
0answers
35 views

How do I block visitors from directly viewing images

I want to prevent visitors to the site from going to http//... ...img.jpg and viewing the image there and instead see them redirected land on the main page. I have tried editing some the .htaccess ...
0
votes
1answer
84 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
0answers
43 views

Magento 2 Multi Site with Subdirectories Setup

I'm in the process of rebuilding a clients site from their Magento 1.3 install to Magento 2.3 and am having a load of trouble setting up the multi site aspect... I've spent weeks googling and trying ...
0
votes
0answers
21 views

Magento 2.2.2 - Restrict access to Admin and redirect to 404 if unautohrized

I need to allow specific IP's/IP range as authorized users to access Magento admin area and redirect to 404 page not found if an unauthorized IP try to access http://store.com/admin. Could think of ...
0
votes
0answers
68 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
1answer
171 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
160 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 ...
0
votes
1answer
1k 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 ...