Por lo tanto, ya puse mi sitio web en el servidor web de alojamiento. Tengo un problema ahora mismo.
por ejemplo tengo esta URL para mi sitio:
http://www.example.com/norwin/beranda
Quiero eliminar o eliminar el nombre de la carpeta "norwin"
de la URL
Estoy colocando mi archivo htaccess en public_html/norwin/.htaccess
este es mi .htaccess
código:
RewriteEngine on
RewriteCond $1 !^(index.php|images|stylesheets|system/application/sources/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/norwin/$1 [NC,L]
esta regla no esta funcionando
Respuestas
0 para la respuesta № 1Podrías intentar cambiar tus rutas .php
$route["controller/function"] = "controller/function";
A
$route["function"] = "controller/function";
Guía del usuario Enrutamiento URI http://www.codeigniter.com/userguide2/general/routing.html
Mi htaccess
Options +FollowSymLinks
Options -Indexes
<FilesMatch "(?i)((.tpl|.ini|.log|(?<!robots).txt))">
Order deny,allow
Deny from all
</FilesMatch>
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]