RewriteRule ^([A-Za-z0-9'"%ãõáéíóúâêîôûàÁÃÕÁÉÍÓÚÂÊÎÔÛÀ\/\.\-]*)$ public_html/$1 [NC]
I'm using this Regex up here and it works just fine, but if I put for example:
RewriteRule ^([A-Za-z0-9 _'"%ãõáéíóúâêîôûàÁÃÕÁÉÍÓÚÂÊÎÔÛÀ\/\.\-]*)$ public_html/$1 [NC]
This up here doesn't work. because of the Space and underline, I want to include spaces and underline in the regexp, but it doesn't work at all. do I have to add something special to it ?
And this also doesn't work:
RewriteRule ^(.*)$ public_html/$1 [NC]
I want to be able to type anything and open in the public_html folder.
Ex, I type: www.mysite.com/site_1.php then it opens: www.mysite.com/public_html/site_1.php
This .htaccess expression is being tested in the HostGator servers using Apache 2.2.17 and I also tested in my localhost Apache 2.2.17 as well, and same happens.
The Error given when adding the _ and space or .* is this:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Thank you guys in advance.