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.

85 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
711 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 </...
3
votes
1answer
293 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
0answers
55 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
240 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 ...
2
votes
0answers
76 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
2answers
100 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
169 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
29 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
401 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
41 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
0answers
57 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 ...
1
vote
1answer
287 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
2answers
58 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
152 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
46 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
1k 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 ...
1
vote
1answer
32 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
249 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
446 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
368 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
322 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
442 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
128 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
952 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
74 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
47 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
1k 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
369 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
73 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
2answers
660 views

Magento 1.8.1.0 can't login to admin panel - htaccess/memcache suspected

I have recently setup one of my client's live site to local. And was unable to run it on local instantly just after modifying core_config_data and local.xml, then I opened .htaccess and found ########...
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
42 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
6 views

Regex Condition for rewriting category from html to non-html

I want to redirect all my .html Categories to non.html. Like this. www.server.com/category/subcategory.html -> www.server.com/category/subcategory/ Its working fine with this line: RedirectMatch ...
0
votes
1answer
14 views

Display my images in ebay listings (or other website) .htaccess question

I have a Magento site (2.4.3) running on Ubuntu with Apache. I am creating eBay listings which are using images from the https://<mysite.com>/images folder. The images are not displayed. If I ...
0
votes
0answers
16 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
36 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
22 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
341 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
99 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. ...
0
votes
2answers
84 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
39 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
60 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
0answers
73 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
1answer
358 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
168 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
81 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 ....