RewriteRule ^([A-Za-z0-9'"%ãõáéíóúâêîôûàÁÃÕÁÉÍÓÚÂÊÎÔÛÀ\/\.\-]*)$ public_html/$1 [NC]
I use this regex here and it works fine, but if I set it, for example:
RewriteRule ^([A-Za-z0-9 _'"%ãõáéíóúâêîôûàÁÃÕÁÉÍÓÚÂÊÎÔÛÀ\/\.\-]*)$ public_html/$1 [NC]
This does not work. due to Space and underscore, I want to include spaces and underscore in regexp, but it doesn't work at all. Do I need to add something special?
And this also does not work:
RewriteRule ^(.*)$ public_html/$1 [NC]
I want to be able to enter something and open in the public_html folder.
Ex, I type: www.mysite.com/site_1.php then opens: www.mysite.com/public_html/site_1.php
This .htaccess expression is tested on HostGator servers using Apache 2.2.17 and I also tested Apache 2.2.17 in my localhost, and this also happens.
Error adding _ and space or. *:
Internal server error
The server detected an internal error or incorrect configuration and your request failed.
Contact the server administrator, admin @localhost and tell them the time when the error occurred, and anything you could do that could lead to an error.
Additional information about this error may be available if a server error logs in.
Thanks guys in advance.
Grego source share