How to change the main URL in Codeigniter

Asked

Viewed 721 times

0

I need to change the URL of a site in Codigniter, at the site root: "public_html" has the "application" folder of the Framework and has the folder: "site_new" which is where the current site is.

When opening the domain of the site it directs to the folder of the new site...: www.meudomio.com.br/site_new

*Which file do I change within the Codeigniter folder structure to change this index URL? For example, if I want to change the name of the folder (site_new) to another any redirect will always play to the old name...


When editing the $config['base_url'] have no effect:

inserir a descrição da imagem aqui

The site continues to be directed to: www.dominio.com.br/site_new

2 answers

1

In the application folder, you have another folder called config. There change the value of $config['base_url'] = 'http://www.pagina.com/que/voce_quiser';

  • did not work yet, in the parameter was set only the main domain...I put a /test at the end, however continues to direct to www.domain/site_new

  • I’ll attach a print to the question

  • Does this "/test" you put in exist? Because codeigniter only tries to guess the main page if there is no file. In this case the test should be the name of a controller with a method index()

0

Take a look at your .htaccess see if there’s a line that looks like this:

RewriteRule ^(.*)$ /site_novo/index.php?/$1 [L]

If you have change for:

RewriteRule ^(.*)$ /teste/index.php?/$1 [L]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.