0

Here is my website url of pub folder https://www.marketplace.jawadditaksal.org/pub/

when I installed Magento in the server by default Magento adds two .htaccess files: one in the domain directory and one in /pub, which I have renamed to ".htaccess_no" because at that time website css was not working so in the pub folder I renamed the htacess file from "htacess" to "htacess_no" and website was working and which is now working also.

But the problem is when user open the url https://www.marketplace.jawadditaksal.org/pub/ its shows the website in a wrong way, what is the solution of the pub folder index file, how normally Magento websites handle pub folder. should I add empty index file in the pub folder?

Kirti Nariya
  • 3,471
  • 2
  • 21
  • 50
  • Don't rename htaccess of pub folder. Are you running your website from pub folder? – Sukumar Gorai Mar 27 '19 at 13:14
  • why are you trying /pub when https://www.marketplace.jawadditaksal.org/ is just working fine – Philipp Sander Mar 27 '19 at 13:14
  • @SukumarGorai no I am not running my website from pub folder, problem was when I installed the magento 2.3 with the demo, at that time main domain directory website css was not working so my server company found the solution that to rename the htacess file of the pub folder, at that time website was working which is also working now, but problem is when someone manually open the website pub folder websitename/pub then on that case it shows the pub folder index file which looks bad. – winnersingh Mar 27 '19 at 13:25
  • @PhilippSander Website is working fine because I edit the name of the .htacess file which is in the pub folder previous name was .htacess at present its name is htacess_no but problem is when someone manually open the website pub folder websitename/pub then on that case it shows the pub folder index file which looks bad – winnersingh Mar 27 '19 at 13:28
  • you should not do ANYTHING with the .htaccess in pub. why did you change it? – Philipp Sander Mar 27 '19 at 13:32
  • @PhilippSander I did not change the content of .htacess in the pub folder, I just change the name of the htacess in the pub folder from htacess to htacess_no because if i did not change the name of the htacess in the pub folder then the main website is not working – winnersingh Mar 27 '19 at 13:36
  • you need the file exactly with that name. if the page is not working you have something on your webserver configured wrong – Philipp Sander Mar 27 '19 at 13:39
  • please provide your apaches vhost config in the question – Philipp Sander Mar 27 '19 at 13:39
  • @PhilippSander Server version: Apache/2.4.7 (Ubuntu) Server built: Sep 18 2017 16:37:54 – winnersingh Mar 27 '19 at 14:19
  • that not the vhost config – Philipp Sander Mar 27 '19 at 14:21
  • @PhilippSander could you please explain where can i found this. – winnersingh Mar 27 '19 at 14:22
  • in your site-available directory of your apache2 – Philipp Sander Mar 27 '19 at 14:23
  • @PhilippSander see now what I did is Create a new HTML file and new .htacess file in the pub folder and older one I changed the name to index.old and htacess.old, so now when someone type this url https://www.marketplace.jawadditaksal.org/pub/ it will redirect to main index website. it is fine now? – winnersingh Mar 29 '19 at 13:23
  • I still don't get why you changed something in the pub/ folder in the firstplace... – Philipp Sander Mar 29 '19 at 13:30
  • @PhilippSander As I mention earlier that when I check the website url /pub its seems like some thing opens but css not working, so that is why I redirect that to main website. – winnersingh Mar 29 '19 at 13:44
  • @PhilippSander same problem I found in this website http://themes.magesolution.com/claue/m2/pub/ http://themes.magesolution.com/claue/m2/ – winnersingh Mar 29 '19 at 13:45

0 Answers0