Reputation: 19
I have two websites on the same hosting, my root website uses .htaccess and I can browse it successfully, but my second domain sends me 500 Internal server error . if i delete the .htaccess i can browse both sites well, but i need the .htaccess for my first website.
.htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|img|css|js|uploads|robots\.txt|sitemap\.xml)
RewriteRule ^(.*)$ index.php/$1 [L]
file structure
-js
-css
-second-domain.com ( here lies my second domain, i cant browse it , 500 internal server problem )
-upload
.htaccess
index.php
sitemap.xml
I do hope someone gives me the right commands to put in .htaccess to be able to visit my second domain, thanks in advance.
Upvotes: 1
Views: 89
Reputation: 19016
You should have this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]
Upvotes: 2