• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with base_url()

#11
What Operating system are you running Windows or what?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#12
Yes I have windows.
Reply

#13
You can edit the windows environment and add the folders to the path variable.

That's how I have my Windows 10 pro x64 setup

I use xampp not wamp.

1) Click on Control Panel.
2) Click on System and Security.
3) Click on System.
4) On the left side click on Advanced system settings.
5) Click on the bottom button Environment Variables.
6) Click on path in the bottom list them edit.
7) Add the paths to folders ie: php www htdocs etc;

On windows I find it best to use xampp.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#14
I installed xampp, using your htaccess and added to enrivonment variables. But it's still the same :/
Reply

#15
How is your base url set in the config.php file?

If your editor has a mapping function for folders map the folder that has index.php
in it to / a forward slash.

I use phpStorm and I map my public_html folder like that because that's how my live
server is setup public_html
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#16
I tried to upload my site in a host and it was working (without index.php) It should be from my windows or xampp no ?
Reply

#17
Are you using a route in your routes config file?
Reply

#18
What is your directory structure like?

application
system
public_html or public
-- index.php

That's how mine is setup to match my live servers.

you need to edit the index.php and change the application and system paths
to ../application and ../system

This only needs to be done if you have moved the application and system folders.

The structure shown above is for security reasons.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#19
-application
-config
-etc..
-assets
-css
-etcc
-system
-user_guide
-.htaccess
-index.php
-etc..

I don't have route except this one :
$route['default_controller'] = 'Home';

My site url for local:
$config['base_url'] = 'http://localhost/multi/';

When I hosted:
$config['base_url'] = 'https://multi.com/';

I tried with only http://localhost/ not working too.
Reply

#20
PHP Code:
$config['base_url'] = 'https:/www.multi.com/'

Try changing it to that.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.