cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
Highlighted

No .htaccess file

There's a problem with my website that can only be fixed by editing the .htaccess file, but my website doesn't have an .htaccess file and whenever I try to add one, the website stops working. How do I fix this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III
Solution

Re: No .htaccess file

@tslewis 

 

2 things to try -

1) add usePushState: 'false', to the config option for the script  - make sure to add a comma after baseId: 'myShop'

2) apparently Spreadshirt has a WordPress plugin which can help remove the #! as well.  https://www.spreadshop.com/blog/2019/11/28/wordpress-plugin-update-more-freedom-in-shop-integration/

 

This really seems to be an issue with the SpreadShop software - If you continue to have issues I would reach out to their support for assistance 



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

14 REPLIES 14
Highlighted
Super User I
Super User I

Re: No .htaccess file

Hello @tslewis and thank you for reaching out to the community. 

 

Could you provide some more detail of your issue?

 

You might also give this GoDaddy article a read as well. 


Very Respectfully,

Drew Davis
Navy Veteran and Entrepreneur | GoDaddy Pro user | "Proud to be serving others!"

*** Please note that I offer free advice on this forum. Please feel free to give me KUDOS on this topic/discussion; mark my comment as ACCEPTED SOLUTION if you believe I've helped solved your issue. Thanks! ***
Highlighted

Re: No .htaccess file

I run a business using spreadshirt and the URL has hashbang in it that I'm trying to get rid of and the only way to fix it is to edit the .htaccess file, which my website doesn't have. I've tried creating an .htaccess file several times, but after I upload it, I get an error message. There's a file called .htaccess_cache, but no actual .htaccess file. Do I need to buy an SSL certificate to get an .htaccess file?

Highlighted
Super User I
Super User I

Re: No .htaccess file

What GoDaddy hosting product are you using? 

 

Usually, they are hidden files sometimes. Normally if you use Filezilla or any other product, you should see the .htaccess file either at the root or www root of your website. 


Very Respectfully,

Drew Davis
Navy Veteran and Entrepreneur | GoDaddy Pro user | "Proud to be serving others!"

*** Please note that I offer free advice on this forum. Please feel free to give me KUDOS on this topic/discussion; mark my comment as ACCEPTED SOLUTION if you believe I've helped solved your issue. Thanks! ***
Highlighted

Re: No .htaccess file

I'm using GoDaddy's economy Linux hosting with cPanel. I tried using Filezilla to find the .htaccess file, but I still can't find it. My website doesn't have an SSL certificate, would that have anything to do with why there's no .htaccess file?

Highlighted
Super User I
Super User I

Re: No .htaccess file

I don't think you need to have SSL  for that. 


Very Respectfully,

Drew Davis
Navy Veteran and Entrepreneur | GoDaddy Pro user | "Proud to be serving others!"

*** Please note that I offer free advice on this forum. Please feel free to give me KUDOS on this topic/discussion; mark my comment as ACCEPTED SOLUTION if you believe I've helped solved your issue. Thanks! ***
Highlighted
Super User III
Super User III

Re: No .htaccess file

@tslewis 

1) As @davisdre317  said you do not need an SSL to use .htaccess

2) I suggest going into your cPanel file manager to access this. It should be in the root of your public_html folder.

 

I am assuming you are doing some sort of URL re-write rule. The syntax for these rules are very important and case sensitive. If you could post your URL and the code you are trying to put in the .htaccess file the community will be able to better assist you.



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Highlighted

Re: No .htaccess file

I checked the public_html folder, it's not there or anywhere else.

Highlighted
Super User III
Super User III

Re: No .htaccess file

@tslewis 

 

Ok so it's possible you don't yet have a .htaccess file and need to create one - they aren't created by default unless you are using something like WordPress

 

So the next step / question is what is the code you are attempting to put into the .htaccess file?



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Highlighted

Re: No .htaccess file

I'm trying to get rid of hashbang and the only way to do it is by putting this script in the .htaccess file.

 

RewriteEngine On
RewriteBase /
RewriteRule ^#!/(.*)$ /$1 [L,NC,R]

 

How do I create a working .htaccess file with this script in it?

Highlighted
Super User III
Super User III

Re: No .htaccess file

@tslewis 

 

So you will need to create a .htaccess file via the File Manager - but there is an error with your Rewrite rule

 

What is your actual URL so I can see what it is currently and what you are attempting to have it be?



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Highlighted

Re: No .htaccess file

The URL is http://ad-infinitum.co, but it shows up as http://ad-infinitum.co/#! in my address bar. I'm just trying to get rid of the /#! at the end.

Highlighted
Super User III
Super User III

Re: No .htaccess file

@tslewis 

So I just found https://www.spreadshirt.net/forum/t/how-to-remove-the-hashbang-from-any-url-shopname-com/6711 on Spreadshirt's site.

 

So you need to include both little snippets

 

Step 1) Go to File Manager via cPanel

Step 2) once in the public_html file click the + New File and the file name should be .htaccess

Step 3) Past in the following code

RewriteEngine On
RewriteBase /
RewriteRule ^#!/(.*)$ /$1 [L,NC,R]


RewriteEngine On
RewriteCond %{QUERY_STRING} ^(. )&(. )$
RewriteRule ^(.*)$ /$1?%1&%2 [L,R]

 

You may not need the 2nd snippet so I would try the first one and save the file - if it still isn't working then try adding the 2nd



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Highlighted

Re: No .htaccess file

I tried it and it didn't work, the hashbang is still there. Also, the second script caused my website to stop working.

Highlighted
Super User III
Super User III
Solution

Re: No .htaccess file

@tslewis 

 

2 things to try -

1) add usePushState: 'false', to the config option for the script  - make sure to add a comma after baseId: 'myShop'

2) apparently Spreadshirt has a WordPress plugin which can help remove the #! as well.  https://www.spreadshop.com/blog/2019/11/28/wordpress-plugin-update-more-freedom-in-shop-integration/

 

This really seems to be an issue with the SpreadShop software - If you continue to have issues I would reach out to their support for assistance 



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post