.htaccess rewritebase when in subdirectory on subdomain

As I am trying to transfer my website from localhost to a test domain on our server, I need to adjust my htaccess, since it refers on the localhost to a different folder. I am transfering it to test.mydomain.com/jellyweb/ yet whenever I adjust the rewritebase to match it, the site gives me a 500 error.

    php_flag display_errors on

    Options +FollowSymLinks
    RewriteEngine On

#   RewriteCond %{HTTP_HOST} ^ 
#   RewriteRule (.*) http://www.jellyfishwebdesign.nl/$1 [R=301,L]  
#   RewriteCond %{HTTP_USER_AGENT} libwww-perl.* 
#   RewriteRule .* – [F,L]

    RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    RewriteBase /test/jellyweb/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([A-Za-z0-9-]+)$ index.php?p=$1 [L]
    RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$  index.php?p=$1&sp=$2 [L]
    RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$  index.php?p=$1&sp=$2&t=$3 [L]

The folder layout is public_html/test/jellyweb

I am not sure how get the rewritebase link correctly in this case, cause even when i just do RewriteBase /jellyweb/ it doesn’t work. Am I overseeing something? Sorry, htaccess is not I am familair with really.

Source: .htaccess

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.