Welcome Guest, Not a member yet? Register   Sign In
I WANT REMOVE index.php from ALL my url...
#1

[eluser]GioMBG[/eluser]
I ALL,
I want remove index.php from all my url but seems impossible:
In my config:
$config['index_page'] = '';
$config['base_url'] = '';
when I load the default controller ok I can do this without index.php but when I tray to load another controller ALWAYS I have to point to the index.php/controller/function (if not 404) but I get another whoole of errors and I can't load correctly as I do without...
ALL the test with full_relative_path was just do.
Suggestions ?
GioMBG
#2

[eluser]Massaki[/eluser]
You should create a .htaccess file in your project folder. See Codeigniter Manual
#3

[eluser]GioMBG[/eluser]
Hi Thanks,
Just do dosen't work.
I'm going stuck to try ALL possible .htaccess and all settings
what I can do ?
GioMBG
#4

[eluser]Massaki[/eluser]
Code:
$config['base_url'] = 'http://www.domain.com/application_name/';

Try to create a link like this:
Code:
echo anchor('controller/method', 'Link_text');

The HTML code should be:
Code:
<a href="http://www.domain.com/application_name/controller/method">Link_text</a>
#5

[eluser]GioMBG[/eluser]
[quote author="Massaki" date="1386077147"]
Code:
$config['base_url'] = 'http://www.domain.com/application_name/';

Here in $config['base_url'] I can write what I x I want that anythink change,

Try to create a link like this:
Code:
echo anchor('controller/method', 'Link_text');

the controller default in config/routes work perfectly, if I need to recall some other controller (SURE TESTed 100 %) dosen't work and I retrive 404, BUT if I include index.php (I should NOT DO because in my config I have a blank $config['index_page'] ) I can load the script (incredible) but with the all kinds of errors possible regarding the http path of my includes css etc. because thay don't expect index.php...

The HTML code should be:
Code:
<a href="http://www.domain.com/application_name/controller/method">Link_text</a>
[/quote]
leave the index.php is THE PROBLEM that ci have to resolve, way that don't make exactly the opposit as:
if You want index.php in all your x urls because You're x set this configuration $config['see_index_in_all_your_uri'] = YES; ??

GioMBG
#6

[eluser]Tpojka[/eluser]
In most cases $config['base_url'] would be:
Code:
$config['base_url'] = 'http://www.domain.com/';
That is the case you have file system in root of web server as following:
Code:
-application
-system
-.htaccess
-index.php
'application_name' could be overrage.
#7

[eluser]GioMBG[/eluser]
Really thanks 2 All,
now I'm going stupid to see all around per 3 hours more from now...
after I will say bye bye to ci,
what I understand that maybe is better wait a little bit more stability and progress in standards configurations before to use...
(I learn that this is not the only problem)
GioMBG
#8

[eluser]Tpojka[/eluser]
Because of this:
[quote author="GioMBG" date="1385821244"]Hi ALL,
newbie ci...
[/quote]

If you see this as hard, maybe you should try with WP.
Those settings are made over GUI.

User guide is well writen and you need to read it only.
#9

[eluser]GioMBG[/eluser]
I see this problem hard ?
try to check how many...
https://www.google.ch/search?q=index.php...er+problem
GioMBG

#10

[eluser]CroNiX[/eluser]
Funny thing is, this doesn't have to do with codeigniter at all. It has to do with your web server environment and its settings and whether or not the WEB SERVER can rewrite the url (to pass to codeigniter). I'd bet that most people having this problem will have the exact same problem with other frameworks as they just about all do this to remove index.php from url....even wordpress.

Look at the docs for removing index.php from Laravel, Wordpress, CodeIgniter, ZendFramework, etc. They are all almost the exact same thing and involve creating a htaccess (which isn't php) or similar.

Go google each of those frameworks like you just did with CI and you will find just as many problems, so your research isn't very complete for making a good decision on this topic.

If you want to compare apples to apples:
https://www.google.ch/search?q=index.php...ss+problem
https://www.google.ch/search?q=index.php...el+problem
https://www.google.ch/search?q=index.php...rk+problem




Theme © iAndrew 2016 - Forum software by © MyBB