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
425 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
498 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
547 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
348 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
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 ...
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,...
0
votes
1answer
26 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
452 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
5k 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
106 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
3k 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
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 ...
0
votes
1answer
2k 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
292 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
4k 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
vote
1answer
26 views

google search result error after removing store name

I have developed an e-commerce site using Magento 1.9. And it is working very fine. But the problem is when the site was live google crawled all the pages and products with the store name such as ......
1
vote
1answer
1k views

Domain redirection in htaccess not working

I have changed domain on the Magento store, however I need to still keep old domain urls accessible and redirected to new domain urls. for example. old-domain.com/products should redirect to new-...
0
votes
0answers
23 views

Magento display old images that are referenced in CSS

I am keep seeing the old images that are referenced in CSS file. This image was changed more than two months ago. The only way to refresh the images is to open the store via incognito mode. I thought ...
0
votes
1answer
260 views

local project url redirected to live project (project url import issue)

I want to run my live project in localhost , I have downloaded my Magento2.0 project from live and in localhost I am using xampp server , I have done this things many times , my all necessary commands ...
4
votes
3answers
7k views

Magento 2: Apache mod version not enabled/installed/allowed by host, causes 500 error on all pages due to failing .htaccess files

I created a fresh install of Magento 2.2.2 on a debian server using php7.1 and mysql 5.7. Once files were extracted, I was unable to access the setup wizard and received 500 errors from all pages. ...
1
vote
1answer
4k views

htaccess file on Magento director not working

I need to remove index.php from Magento website url. I have checked https://stackoverflow.com/questions/10474740/how-to-remove-index-php-from-urls. I have followed the same instruction and ...
4
votes
2answers
400 views

How to create wild card sub domain in Magento 1.9.x

I am coming with question of how to create a wildcard subdomain in Magento 1.9.x without using store view. I know creating more store view will cause the issues in price indexing, flat tables, etc., ...
0
votes
2answers
167 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
6
votes
2answers
2k views

How to secure Magento version control systems

Magento version control systems such as Git and Subversion store their metadata in hidden folders. Someone access my directory and mail me. I think I am not protecting my GIT. can anyone tell me how ...
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 ...
3
votes
2answers
318 views

How can I hide directory listing for hacker

My site build with Magento 1.9.3.4. someone sends me a mail with an attached image which is my listed directory. My question is how they fetch this. Did any setting to avoid this type of access.
0
votes
1answer
530 views

Magento2.2 default storeview error store id not found

I have created 2 store views in magento latest 2.2 I have enabled add store view to url in settings. But on home page it throws error store id not found. If I add en/ at the end of url or ar/ at ...
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 ...
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. ...
0
votes
1answer
1k views

Using htaccess to redirect baseurl with index.php

I have 1.9.3.6 magento installed with sample data. The backend works fine, but the frontend breaks with any links. I'm running it with apache through localhost. Base URL: http://127.0.0.1/magento ...
0
votes
2answers
2k views

what folder does admin live in?

I'm troubleshooting an admin issue for a 3rd party's Magento CE 1.9.?. They "renamed" their admin URL, but they also secured their admin using .htaccess to restrict access to specific IP. I'm trying ...
0
votes
1answer
30 views

Image or JS not showing on Magento 2

I've just installed Magento 2 onto my production server under a development subdomain. The install appeared to have been successful but I've noticed there are no images or working javascript in both ...
1
vote
0answers
447 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....
4
votes
3answers
135 views

alias for login page as /accounts

We have a magento website on /store folder. Idea is, on root folder, index.php will have company website. /store folder will have magento folder. Idea is, www.example.com/account should load login ...
0
votes
1answer
26 views

Problem with showing customer avator in account information page

I have added a custom image field to customer and I want to show it in customer information page. when it is uploaded it saves into pub/media/customer folder. Now I want to have its url to see the ...
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. ...
0
votes
1answer
262 views

How can I add IP Based login in magento admin. [duplicate]

I want to add IP based Magento admin login. I have tried below code: # Restrict admin access RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123 RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123 ...
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=...
0
votes
1answer
41 views

Something is modifying .httaccess

There is a strange problem, about 2 times a day in our .htacess file the RewriteEngine line is changed fron on to off Options +FollowSymLinks RewriteEngine off We have checked everything, there is ...
1
vote
1answer
302 views

Nginx auth off whole folder

We're trying to setup Klaviyo on our Zandbox/test site with nginx. But Klaviyo cant get the data from SOAP when i have htpasswd enabled. It needs to visit www.mytestdomain.com/api/v2_soap?wsdl=1 to ...
0
votes
1answer
501 views

Always 404 error on my front-end magento 1.9.3.4

I put my site online in a hidden directory www.mydomain.or/test/magento/ with .htacces on my folder test I put the url not secure = mydomain.or/test/magento/ And url secure = mydomain.or/test/...
2
votes
1answer
2k 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
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? ...
7
votes
4answers
13k 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 ...
0
votes
1answer
216 views

Something problem with htaccess

I have add following htaccess but not work ############################################ ## uncomment these lines for CGI mode ## make sure to specify the correct cgi php binary file name ## it might ...
1
vote
1answer
58 views

Nice, clean URL for my store

I want that that, when I navigate to myStore.com the displayed contents are actually the ones of myStore.com/subdirectory but without changing the URL. I tried different configurations of ....
0
votes
2answers
775 views

Change http to https in magento

getting some error in the console Mixed Content: The page at 'https://www.xxxxx.com/bedroom/beds/beds- without-storage' was loaded over HTTPS, but requested an insecure image 'http://www.xxxxx.com/...
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 ...