Welcome Guest, Not a member yet? Register   Sign In
Error 500 / mod_rewrite / 1&1 hosting
#1

[eluser]Stanfield[/eluser]
Hi guys

I've been stuck for 2 weeks now, I can't find a solution neither here nor on google...

So, My hosting is 1&1, I'm using PyroCMS, I can display the index.php but I get a 500 error if I click anywhere (register, connection,...) ANYWHERE !

Could you please help me through this cause I need it working for a student project very soon.

Here is my htaccess :
Code:
#1and1 PHP5 activation
AddType x-mapp-php5 .php

<IfModule mod_rewrite.c>
    #Options +FollowSymLinks
    RewriteEngine on
    
    # Redirects direct controller views to the right URL
    # Not so much for security, done for Coda previews
    RewriteRule modules/(.+)/controllers/(.+)\.php$ /index.php/$1/$2 [L,R=301]
    RewriteRule controllers/(.+)\.php$ /index.php/$1 [L,R=301]
    
    # Remove the .html extention if present (and not an existing file)
    RewriteCond %{REQUEST_URI} ^(.*)\.html$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)\.html$ index.php/$1 [L]

    # Send request via index.php (again, not if its a real file or folder)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

thanks a million !
#2

[eluser]Mr. Fulop[/eluser]
Hi Stanfield,

1) First of all take a look at your webservers error and access log.
2) I would suggest starting from an empty .htaccess file and then add the rules and see which one gives you the 500 error.
4) Check your Code Igniter config file and set the uri_protocol like this :
$config['uri_protocol']= "REQUEST_URI"; (or set it to "AUTO")
3) I would keep in the .htaccess file just the following:

Code:
<IfModule mod_rewrite.c>
    Options +FollowSymLinks -Indexes
    RewriteEngine on
    RewriteBase /your/root/to/your/html/files/
    # Send request via index.php (again, not if its a real file or folder)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

Hope it helps...
#3

[eluser]Stanfield[/eluser]
I tried averything you suggested, and I still get that 500 error...

here is my logs folder : http://s313215490.onlinehome.fr/logs/

I also set up a local php.ini files with this :
Code:
post_max_size = 40M
memory_limit = 32M

it may be also a 500 error cause
#4

[eluser]Stanfield[/eluser]
...but I sucessfully deactivated the url rewriting so the site's working now. Strange behaviour though anyway.
#5

[eluser]Mr. Fulop[/eluser]
I could not access that url http://s313215490.onlinehome.fr/logs/. I am prompted for an user and password. Send me a private message with the log and I may be able to sort it out.
#6

[eluser]Stanfield[/eluser]
yeah, the folder's restricted by the hoster... I couldn't find a way to unlock it
#7

[eluser]pickupman[/eluser]
Not sure if 1&1 has changed their mod_rewrite module, but I know when I previously hosted with them mod_rewrite didn't work as anticipated. It will rewrite the request, but I could never get it to support clean URL's. The closest I got to clean URL's was doing 302 redirects, so I ended switching the domain to better hosting. I have several other domains on cPanel accounts, and after I took on the work for the 1&1 hosted site it was nothing but problems.

Try rewriting a real file or url ie( foo.html -> bar.html), and you will see what I mean.




Theme © iAndrew 2016 - Forum software by © MyBB