views:

12

answers:

1

I seem to be having an interesting problem in that .htaccess isn't routing to /public_html/index.html by default as it should, and I'm getting a page not found error. I do know that someone tampered with the file recently but have no idea what they did and I unfortunately know nothing about routing. I tried to do some research but didn't come up with anything that gave a solution to my predicament. Does anyone know how to go about making the server route to public_html? Here's what I have right now.

RewriteEngine on

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName evolvingwebcreations.com

#-------------------------
RewriteCond %{HTTP_HOST} ^swinkapps.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.swinkapps.com$
RewriteRule ^(.*) "http\:\/\/127\.0\.0\.1\:12005\/$1" [P,L]
#-------------------------

RewriteCond %{HTTP_HOST} ^swinkapps.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.swinkapps.com$
RewriteRule ^clients(.*) "http\:\/\/127\.0\.0\.1\:12005\/$1" [P,L]

Thanks in advance!

A: 

I don't believe it ever routes to public_html by default. You'll need to specify

UserDir public_html

and possibly set some access permissions such as

<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
bemace
would that go at the top of the .htaccess file?
DeepThought
I'd normally put it in the main apache configuration file. I don't think it matters where in the file you put it. I'm not sure whether it would work in the .htaccess file. If it's a hosting-providers server it's possible they're restricting it.
bemace
Thanks for the help. The site is hosted by a hosting-provider. After rolling back the .htaccess file to the old file and adding back in the routing for my rails app its working beautifully. It turns out that the following lines were creating the issue and once removed all paths work correctly RewriteCond %{HTTP_HOST} ^swinkapps.com$ [OR] RewriteCond %{HTTP_HOST} ^www.swinkapps.com$ RewriteRule ^(.*) "http\:\/\/127\.0\.0\.1\:12005\/$1" [P,L]
DeepThought

related questions