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
4answers
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 ...
1
vote
1answer
828 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 ...
0
votes
3answers
1k 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. #########...
1
vote
2answers
47 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
1answer
1k views

Admin Login redirecting after login

I have cloned my 1.9.1 install to a subdomain successfully. However an odd behavior is occurring. When I attempt to login to the admin, the page reloads, the login fields are blank, and I noticed ...
0
votes
1answer
1k views

SSL Magento 1.9 but receiving Your web server is configured incorrectly

I successfully implemented SSL on our website and went the LetsEncrypt to get my CA. All is set properly and in working order except one weird issue I am encountering post enabling. Your web server ...
0
votes
1answer
1k views

magento htaccess allow access specific folder

I want to access a folder in root directory in Magento like example.com/foldername but i got a blank page. So my question: how i can allow access specific folder in root directory in Magento using ...
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. ...
4
votes
5answers
58k views

Getting 404 Not Found Error on every page except index.php [closed]

Because of some reason my site stopped working. After that I have uploaded the backup which I had created earlier. I am getting a "404 Not Found Error The resource requested could not be found on ...
0
votes
0answers
19 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
17 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
0answers
23 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....
0
votes
0answers
47 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
48 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
2answers
596 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 ########...
3
votes
3answers
6k views

Magento 2 Multistore is not working with multi domain

I am facing issue while creating multi store in magento 2. I have added 2 store abc and xyz, each points to different domain. I have added suggested code from different sites. In index.php I added ...
2
votes
1answer
660 views

Browser Language Redirection For Multi Language Stores In Magento 2

Anybody knows how to use the following piece of code? I want detect visitors browser language and than redirect for the right multi language store. Want to use subfolders (www.domain.com/en/), not ...
0
votes
0answers
51 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
2answers
1k views

redirecting magento install in subfolder to subdomain

I installed Magento in a sub-folder of my public HTML root but I cannot seem to get it to redirect from example.com/shop to shop.example.com. I have tried to change the .htaccess file in the sub-...
4
votes
1answer
623 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 </...
1
vote
1answer
944 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 ...
0
votes
3answers
3k views

Install issue permission and htaccess

I'm trying to install Magento 2. I run this for permission file and folder chown -R admin:www-data /var/www/magento2 find /var/www/magento2 -type f -print0 | xargs -r0 chmod 640 find /var/www/...
0
votes
1answer
24 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
64 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 ...
1
vote
1answer
28 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
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 ...
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 ...
0
votes
1answer
47 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 ...
1
vote
0answers
31 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
19 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
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 ...
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 ...
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
36 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
2answers
120 views

Is it possible to Manage .htacess file from Admin Panel?

Is there any way I can edit and update .htaccess file from admin panel of Magento. I'm using Magento 1.9
2
votes
1answer
627 views

Magento Secure Magmi from unauthorized access using htaccess

I'm using below htaccess file to prevent unauthorized access to Magmi. /{root_path}/{magmi_dir}/.htaccess Order deny,allow Deny from all Allow from 127.0.0.1 202.131.115.180 xxx.xxx.xxx.xxx this ...
1
vote
0answers
59 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
1answer
3k views

Unable to access magento without /index.php/ in the URL [duplicate]

I have fully downloaded a magento 1.9.1 instance and it's DB which was running on a server into my computer and trying to get it up and running using WAMP server. everything looks fine except that I ...
0
votes
1answer
87 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
55 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 ...
15
votes
4answers
25k views

PageSpeed - Eliminate render-blocking JavaScript and CSS in above-the-fold content

I am running magento 1.9, and I am using the RWD slider that comes with Magento 1.9 on the home page. Google's PageSpeed doesn't like this and says: Eliminate render-blocking JavaScript and CSS ...
4
votes
3answers
10k views

Set individual image cache/expire date

I have a question regarding the image caching and although I am not quite sure, if Magento SE is the right place for this kind of question, but I thought it would be interesting for others to know as ...
0
votes
2answers
256 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/...
1
vote
2answers
950 views

Magento 2: Redirect from Category Page to CMS Page

I already gone through How to redirect a category to another link Still i have issue. In my .htaccess , in <IfModule mod_rewrite.c> before end of </IfModule> i wrote Redirect 301 /...
0
votes
0answers
23 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 ...
1
vote
1answer
2k 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://...
2
votes
6answers
27k views

Magento 1.9 - .htaccess file missing

I have a problem with the .htaccess file in the root category of my server. It is not there. I searched for hours (google), but i haven't found any solutions. (Magento 1.9) I activated "display ...
0
votes
0answers
74 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
219 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
2answers
764 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....