CodeIgniter Forums
htaccess in a subdomain - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: htaccess in a subdomain (/showthread.php?tid=53835)



htaccess in a subdomain - El Forum - 08-10-2012

[eluser]Unknown[/eluser]
I'm using .htaccess to get rid of the index.php in my url. Example, instead of localhost/folder/index.php/controller/function. I want it to be localhost/folder/controller/function.

I have achieved it in working locally, using these codes:

[code]
RewriteEngine On
Rewritebase /folder/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
[code]

Now I'm uploading it in the web, but on a subdomain.
what should i do to the Rewritebase?

Should it be
[code]
Rewritebase /folder.domain.com/
[code] ?



htaccess in a subdomain - El Forum - 08-10-2012

[eluser]Aken[/eluser]
RewriteBase /, or remove it entirely.