URL without 'index.php' on GoDaddy Hosting. SOS Help me to avoid switching to CakePHP |
[eluser]jmadsen[/eluser]
I have a client on GoDaddy my .htaccess looks like: RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt|css|docs|scripts|system) RewriteRule ^(.*)$ /index.php?/$1 [L] I have a dir structure like: /my_site_name/ css/ docs/ images/ scripts/ system/ .htaccess I do not need to use index.php at all. set $config['base_url'] = "http://www.mysitename.com/"; set $config[‘index_page’] = ""; also, be sure mod_rewrite is active (should be by default on GoDaddy).
[eluser]Stephane02[/eluser]
And what is the $config['uri_protocol'] you're using for your client's website ?
[eluser]Stephane02[/eluser]
The website is: http://www.website.com/MyFolder/controller/action/ In my config: $config['base_url'] = "http://www.website.com/"; $config['index_page'] = ""; $config['uri_protocol'] = "QUERY_STRING"; In the HTACCESS: RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt|css|docs|scripts|system) RewriteRule ^(.*)$ /index.php?/$1 [L] And when I go to http://www.website.com/MyFolder/controller/action/ I get Apache 404 Not found. Any idea what's going wrong ?
[eluser]Stephane02[/eluser]
WOW! IT WORKS NOW! Here is the settings that is working fine: In config.php: $config['base_url'] = "http://www.website.com/MyFolder/"; $config['index_page'] = ""; $config['uri_protocol'] = "QUERY_STRING"; HTACCESS content: RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt|css|docs|scripts|system) RewriteRule ^(.*)$ /MyFolder/index.php?/$1 [L] Now when I go to http://www.website.com/MyFolder/controller/action/ it works fine! Thank You for your time ![]() Stephane |
Welcome Guest, Not a member yet? Register Sign In |