1

Hello everybody,

I have just moved my magentoshop from localhost to a online server. I did everything you need to do like changing url in database and clear cache. Now i have a internal server error. When i give the .htaccess an other name the internal server error changes to a magento 404 error. Does anybody know how i can fix this? I'm working with magento version 1.9.0.1. My site is www.kortingoppannen.nl

5
  • check your log files their will be some log related to this issue. Commented Jul 8, 2014 at 9:11
  • please post the error message.i too got the same issue. Commented Jul 8, 2014 at 9:13
  • check this answer if it helps! stackoverflow.com/a/18726084/857855
    – huzefam
    Commented Jul 8, 2014 at 9:14
  • this is what i get in the error_log: [alert] [client 87.239.101.104] /sites/kortingoppannen.nl/www/.htaccess: Option FollowSymLinks not allowed here Commented Jul 8, 2014 at 9:35
  • I fixed it. I needed to put # before options and DirectoryIndex. I also had a wrong url in the database. Tnx everybody for helping me with this problem! Commented Jul 8, 2014 at 11:22

2 Answers 2

2

Please check with your hosting provider that:

  1. they are using Apache as web server. If they're using Nginx then .htaccess doesn't work at all and special configuration is needed
  2. Ask if their Apache configuration supports .htaccess files.
  3. Create a simple .htaccess with some very basic directive and check if it works. If it works check your Magento's .htaccess carefully.
2
  • I am using transip. Do you have any experience with transip or do you know if transip support htaccess files? Commented Jul 8, 2014 at 9:47
  • Unfortunately I don't have any experience with transip. Are you using shared hosting or a dedicated VPS or something? Shared hosting for Magento = asking for trouble:) You need a proper dedicated server, it can be VPS also. Have you checked hypernode.com? They're Dutch I guess.
    – Sven
    Commented Jul 8, 2014 at 11:14
1

Enable rewrite in your HTACESS file, like this:

<IfModule mod_rewrite.c>

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    #RewriteBase /magento/

############################################
## uncomment next line to enable light API calls processing

#    RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]

############################################
## rewrite API2 calls to api.php (by now it is REST only)

    RewriteRule ^api/rest api.php?type=rest [QSA,L]

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks

    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]

############################################
## redirect for mobile user agents

    #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
    #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
    #RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php [L]

</IfModule>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.