mod_rewrite/GoDaddy problem
- by John Deerhake
Ok, so I really don't know much about mod_rewrite and I'm looking over the apache docs and still not figuring this out.
Here is my htaccess (which is mostly just copy & pasted from a site I found):
.htaccess in base dir:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
.htaccess in /public dir:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
Basically I'm using the above htaccess files on my current test server and it works great and exactly like I would expect (everything gets seamlessly redirected to public dir).
Now when I throw this on my GoDaddy hosting account i get "Internal Server Errror". I've done some searching and I'm fairly certain I should be able to use mod_rewrite with GoDaddy.
I suspect this is because I'm not using the base directory to host the site in. The site is in in the folder html/myapp/ (where html is the base directory) and i have a subdomain set up in GoDaddy to look in that folder.