Reputation: 3025
This works fine on localhost:
#The RewriteEngine directive enables or disables the runtime rewriting engine. RewriteEngine On #This won't allow any folder to be accessible if it's not having an index.php file Options All -Indexes #This will redirect user to http://localhost/awe/ if 404 or 403 error comes ErrorDocument 404 http://192.168.1.6/app/ ErrorDocument 403 http://192.168.1.6/app/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
The same gives me error on Godaddy.com server : Error 500
When I remove Options All -Indexes
It use to show me 1st page as index.php exists there but doesn't show internal pages and shows 404
error because its being defined under my Bootstrap
. Kindly suggect what needs to be done.
Also, I have put it into one of my subdomain and within one folder: So the path of my app is like this:
http://mysubdomain.mywebsite.com/myprojectname/app
So my .htaccess
file I am putting in this folder only http://mysubdomain.mywebsite.com/myprojectname/app
Upvotes: 1
Views: 493
Reputation: 199
I think most likely you are getting the 500 error from GoDaddy because you have invalid IPs and path for your 404 handling route and you hit the 404 then everything blows up. Think of 500 as you broke something and 404 as it doesn't exist. Also you haven't defined a base for your rewrite which could be an issue as well.
Here is my advice, study some htaccess rules that are battle tested and known to work 100%, and build from there.
I suggest the most widely used ones in existance... https://codex.wordpress.org/htaccess
Also they have examples for subfolders and subdomains.
Upvotes: 1