Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
lovelygifts

Check My .htaccess & robot files if correct

Question

Posted (edited)

UPDATE: So, it's taken me the whole day and night to fix this issue. I still don't know where the error happened. What I did was re-upload the files in themes>community-themes-default and voila! Website back up and running! Phew.... what a nightmare. Thanks so much to everyone for your input.

Kind regards, Claire

 

Hi, last night I was changing the settings in the back office from 5 steps to checkout to one page checkout. It didn't work correctly and so I changed the settings back. Then, basically since this morning, my website has been showing a 500 error - I've limited knowledge but tried a few things to troubleshoot this: (I'm assuming it's something to do with me perhaps changing the settings yesterday, I don't know but possible?)

  • I've cleared cache and cookies on my laptop.
  • I've cleared cache in back office - advanced parameters - Performance
  • I've uploaded the original file -   'OrderOpcController.php' because it was showing in back office Performance that there had been a change to the file
  • I've uploaded the original file - 'smarty_internal_templatecompilerbase.php
  • I've copied the error code message on the 500 error page into back office decryption, but nothing was showing in the response box
  • I tried re-generating .htaccess

Now, if I paste the .httacces & robots.txt files below, could someone please have a look and see if there's something amiss on either of them or perhaps needs changing somewhere, something adding etc

.HTACCESS

# ~~start~~ Do not remove this comment, thirty bees will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automatically generated by thirty bees e-commerce open-source solution
# http://www.thirtybees.com - http://www.thirtybees.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on


#Domain: lovely-gifts.co.uk
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]

RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/p/$1/$1$2$3.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/c/$1$2$3.webp [L]
RewriteCond %{HTTP_HOST} ^lovely-gifts.co.uk$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.webp %{ENV:REWRITEBASE}img/c/$1$2.webp [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/font-woff .woff
AddType application/font-woff2 .woff2
<IfModule mod_headers.c>
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/webp "access plus 1 month"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/javascript "access plus 1 week"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-javascript "access plus 1 week"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresByType image/svg+xml "access plus 1 year"
    ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
    ExpiresByType application/font-woff "access plus 1 year"
    ExpiresByType application/x-font-woff "access plus 1 year"
    ExpiresByType font/woff2 "access plus 1 year"
    ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
    ExpiresByType font/opentype "access plus 1 year"
    ExpiresByType font/ttf "access plus 1 year"
    ExpiresByType font/otf "access plus 1 year"
    ExpiresByType application/x-font-ttf "access plus 1 year"
    ExpiresByType application/x-font-otf "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
    Header unset Etag
</IfModule>
FileETag none
<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript font/ttf application/x-font-ttf font/otf application/x-font-otf font/opentype
    </IfModule>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, thirty bees will keep automatically the code outside this comment when .htaccess will be generated again

ROBOTS.TXT

# robots.txt automatically generated by thirty bees e-commerce open-source solution
# http://www.thirtybees.com - http://www.thirtybees.com/forums
# This file is to prevent the crawling and indexing of certain parts
# of your site by web crawlers and spiders run by sites like Yahoo!
# and Google. By telling these "robots" where not to go on your site,
# you save bandwidth and server resources.
# For more information about the robots.txt standard, see:
# http://www.robotstxt.org/robotstxt.html
User-agent: *
# Allow Directives
Allow: */modules/*.css
Allow: */modules/*.js
# Private pages
Disallow: /*?orderby=
Disallow: /*?orderway=
Disallow: /*?id_currency=
Disallow: /*?search_query=
Disallow: /*?back=
Disallow: /*?n=
Disallow: /*&orderby=
Disallow: /*&orderway=
Disallow: /*&tag=
Disallow: /*&id_currency=
Disallow: /*&search_query=
Disallow: /*&back=
Disallow: /*&n=
Disallow: /*controller=addresses
Disallow: /*controller=address
Disallow: /*controller=authentication
Disallow: /*controller=cart
Disallow: /*controller=discount
Disallow: /*controller=footer
Disallow: /*controller=get-file
Disallow: /*controller=header
Disallow: /*controller=history
Disallow: /*controller=identity
Disallow: /*controller=images.inc
Disallow: /*controller=init
Disallow: /*controller=my-account
Disallow: /*controller=order
Disallow: /*controller=order-slip
Disallow: /*controller=order-detail
Disallow: /*controller=order-follow
Disallow: /*controller=order-return
Disallow: /*controller=order-confirmation
Disallow: /*controller=pagination
Disallow: /*controller=password
Disallow: /*controller=pdf-invoice
Disallow: /*controller=pdf-order-return
Disallow: /*controller=pdf-order-slip
Disallow: /*controller=product-sort
Disallow: /*controller=search
Disallow: /*controller=attachment
Disallow: /*controller=guest-tracking
# Directories
Disallow: */classes/
Disallow: */config/
Disallow: */download/
Disallow: */mails/
Disallow: */modules/
Disallow: */translations/
Disallow: */tools/
# Files
Disallow: /password-recovery
Disallow: /address
Disallow: /addresses
Disallow: /login
Disallow: /cart
Disallow: /discount
Disallow: /order-history
Disallow: /identity
Disallow: /my-account
Disallow: /order-follow
Disallow: /credit-slip
Disallow: /order
Disallow: /search
Disallow: /quick-order
Disallow: /guest-tracking
Disallow: /order-confirmation
# Sitemap
Sitemap: https://lovely-gifts.co.uk/1_index_sitemap.xml
 

It's probably, hopefully, obvious to someone haha, thanks in advance. Claire

Edited by lovelygifts
Resolved

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Your .htaccess seems to be fine.

Robots.txt on the other way, does not cause 500 errors.

Go to your Admin Panel Performance options and Enable debug mode. Then see what 500 hides from you.

 

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
26 minutes ago, lovelygifts said:

I've copied the error code message on the 500 error page into back office decryption, but nothing was showing in the response box

Are you sure, that you have done that properly? I have to download a file and then upload it. Btw which tb version are you using?

Share this post


Link to post
Share on other sites
  • 0

I opened your site. This 500 Error has a long text there. Encrypted. You can decrypt it in Backoffice > Advanced Parameters > Logs

Share this post


Link to post
Share on other sites
  • 0

Some times error500 is also when there's not enough inodes. This is basically when You have too many files. Look at Your cache folder.

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, Kashir2000 said:

I opened your site. This 500 Error has a long text there. Encrypted. You can decrypt it in Backoffice > Advanced Parameters > Logs

 

1 hour ago, Kashir2000 said:

I opened your site. This 500 Error has a long text there. Encrypted. You can decrypt it in Backoffice > Advanced Parameters > Logs

Hi Kashir

Yes I did try that. It said at the top that the settings had been saved. Above the box where the decrypted message should be it says: 👇👶

This is the decrypted exception message in markdown (can be directly posted on GitHub or the forum)
 
Nothing appears in the box

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, led24ee said:

Some times error500 is also when there's not enough inodes. This is basically when You have too many files. Look at Your cache folder.

Hiya 

I did clear the cache somewhere in the back office. However, do I need to delete all the files and folders that sit in folder 'cache' in the directory itself please?

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, wakabayashi said:

Are you sure, that you have done that properly? I have to download a file and then upload it. Btw which tb version are you using?

I'm using 1.0.8 version - There's no way to upload a file from the back office. I just copied and pasted the text into the box and this message came up:

This is the decrypted exception message in markdown (can be directly posted on GitHub or the forum)
 

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, Kashir2000 said:

Your .htaccess seems to be fine.

Robots.txt on the other way, does not cause 500 errors.

Go to your Admin Panel Performance options and Enable debug mode. Then see what 500 hides from you.

 

Ahh brill about the .htaccess and robots.

Yep I shall go and try that now. I just needed to have a few mins away from the computer as my back is killing me! So is my head after today haha

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, lovelygifts said:

Hiya 

I did clear the cache somewhere in the back office. However, do I need to delete all the files and folders that sit in folder 'cache' in the directory itself please?

There was similar case. I was able to increase inodes (thanks to my host, this was real quick), webpage "born again" and after this I deleted manually via FTP cache files. This "wasn't" very long process, something 12+ hours. I have no idea how many hundred thousand files there was. But this was just one case. Do not try this urgently repeat. There can be many reason for error500 and this was just one.

Share this post


Link to post
Share on other sites
  • 0

@lovelygifts I see you enabled debugging. I see message

" error in template "/home/lovelygi/public_html/themes/community-theme-default/header.tpl" on line 99 "function gtag(){dataLayer.push(arguments);}" - Unexpected ".", expected one of: "}""

That means, that in header.tpl you added gtag code. Put it between {literal} tags.

{literal}Yout google code here.{/literal}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...