GetSimple Support Forum

Full Version: url rewriting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Excuse me for my english, I am french Smile

I use Gs 3.3.4 and I come to you because I have a problem when I enable the url rewriting, I have a 500 Internal Server Error page.
The module mod_rewrite is enabled on the server, my hoster has confirmed me.

I think that the problem is the .htaccess file, but I can not find the problem.

Thanks.

Joffrey

Code:
#
# GetSimple CMS htaccess ROOT file
# apache 2.4
#

# The following require certain allow overrides, if getting 500 error comment them out one by one
# can be resolved in apache httpd.conf to ensure security alternatives

# override charset
AddDefaultCharset UTF-8

# prevent directory listings
Options -Indexes

# Follow symbolink links, This is required for rewrites on some hosts
Options +FollowSymLinks

# Set the default handler.
DirectoryIndex index.php

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
    <IfModule !mod_authz_core.c>
        Deny from all
    </IfModule>
    <IfModule mod_access_compat.c>
        Deny from all
    </IfModule>
    <IfModule mod_authz_core.c>
        <IfModule !mod_access_compat.c>
            Require all denied
        </IfModule>
    </IfModule>    
</Files>

<Files sitemap.xml>
    <IfModule !mod_authz_core.c>
        Allow from all
    </IfModule>
    <IfModule mod_access_compat.c>
        Allow from all
    </IfModule>
    <IfModule mod_authz_core.c>
        <IfModule !mod_access_compat.c>
            Require all granted
        </IfModule>
    </IfModule>    
</Files>

# handle rewrites for fancy urls
<IfModule mod_rewrite.c>
    RewriteEngine on

    # Usually RewriteBase is just '/', but
    # replace it with your subdirectory path
    RewriteBase /~joffta/
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
</IfModule>
# The following require certain allow overrides, if getting 500 error comment them out one by one
# can be resolved in apache httpd.conf to ensure security alternatives

its probably this one
Options -Indexes

and post your host so we can add it to the wiki page for known host issues.
Thanks Shawn for your answer.

My hoster has solved the problem last night. By cons I do not know at all what he did.

Sorry for the inconvenience.

Best regards

Joffrey
Hi Shawn,

i have the same problem with one installation but i get the error only if i set "mod_rewrite" in the config.

Server has mod_rewrite active but i don´t know what´s wrong.

Any idea?
bad root ?
Hello Shawn,

i´m confused about this error (failure)

Code:
Server Setup   GS  Version 3.3.4
PHP Version    5.3.3 - OK
cURL Module    Installed - OK
GD Library    Installed - OK
ZipArchive    Installed - OK
SimpleXML Module    Installed - OK
chmod    chmod - OK
Apache Web Server    Apache - OK
Apache Mod Rewrite    Installed - OK

PHP Info in Backend of GS say "mod_rewrite installed"

I ask my provider which handle the datacenter and he look on my server all okay.

You know what´s wrong ?

Hope you can help enxt year 2015 :-)

wish you a happy new year 2015 if you start in some hours.

best regards from germany.

Harald
Your rewrite might have a bad root , can't help without any info. Check Apache logs?
in the server log itself i have no error on the user host error log of plesk i found this:

[Thu Jan 01 12:15:02 2015] [error] [client 8x.xxx.2xx.17] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://domain.de/

Sorry but i do not understand this :-(

What´s wrong... ?

now i check this kind of error are existing if Use Fancy URLs - Requires that your host has mod_rewrite enabled are enabled or disabled same error not the fault.
I think your rewrite is wrong, or you have two or something.
Post your htaccess file
i found the bug :-) it was my own.

I have changed the RewriteBase from "/" to "/path/" from old installation

Now it works

# Usually it RewriteBase i[s just '/', but
# replace it with your subdirectory path
RewriteBase /
Sorry I kept saying root, I meant base.