Htaccess file missing some parts when switching to a new folder location

Hello everyone!

I have this htaccess code:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]


Options -Indexes

it works well on www.domaind.com

but now i wanted to put my project in www.domain.com/newproject

and my jQuery on load is missing “newproject” :frowning:

$(document).ready(function(){
    $('.classlist').click(function(){
        $('#contenthere').load('/pages/release/release.php');
    });
})

I have multiple pages and places where its like this so simply writing /newproject to the url will not help :frowning:

I tried to change htaccess but couldnt get it work :frowning:

Here is some parts i tried:

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/newproject/ [OR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


#RewriteCond %{REQUEST_FILENAME}.php -f
#RewriteCond %{REQUEST_URI} !^/newproject/
#RewriteRule ^(.*) $1\.php [L]
#RewriteRule ^(.*)$ /newproject/.php/$1 [L]


#RewriteCond %{REQUEST_FILENAME}.php -f
#RewriteCond %{REQUEST_URI} !/$
#RewriteRule (.*) $1\.php [L]

Options -Indexes
#Redirect to the URL www location with subdirectory
RewriteEngine on RewriteBase /
RewriteCond %{HTTP_HOST} domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/directory/index.html [R=301,NC]

Thanks for reply! Unfortunately it does not work ERR_TOO_MANY_REDIRECTS

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.