Welcome Guest, Not a member yet? Register   Sign In
wrong htaccess to remove subfolder from URL
#1

[eluser]Ornis[/eluser]
I got a new CI-driven website developed in a folder called next2, so my base path is www.domain.ch/next2/index.php/main_controller/

To remove index.php I used the following .htaccess file, which is located within the next2/ - folder:

Quote:RewriteEngine On

RewriteBase /next2

RewriteCond $1 !^(index\.php|images|css|js|media|tmp|public|robots\.txt|phpkurs\.css|charts)
RewriteRule ^(.*)$ index.php?/$1 [L]

Works perfect! However, now I would like to remove the /next2/ segment from my URL too. I couldn't figure out, how to do this without breaking links to css-files, etc.

Can someone help me?

Happy new year!





Theme © iAndrew 2016 - Forum software by © MyBB