Sunday 29 January 2017

php - Redirecttion error in .htaccess




I have this in my .htaccess file:



RewriteCond %{HTTP_HOST} ^example.com$ [NC]

RewriteRule (.*) http://www.example.com/$1 [R=301,L]


It should work fine but give me error



http://www.website.com/public_html/
Not Found



The requested URL /public_html/ was not found on this server.




Additionally, a 404 Not Found error was encountered while trying to use an Error Document to handle the request.


Answer



The root ispublic_html so www.website.com goes to that folder as the document root.


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...