.htaccess - How to remove index.php from codeigniter in UBUNTU -


this question has answer here:

i know question being ask already, tried still unable remove index.php url. here details

ubuntu 12.10 php : 5.4.6 mod_rewrite in on ci verson: 2.1 

.htacess like:

rewriteengine on rewritebase /projectname  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php/$1 [l]   

i @ below link no luck.. cannot remove index.php url ci based site

how remove "index.php" in codeigniter's path

my "/etc/apache2/sites-available/default" this:

<virtualhost *:80>     serveradmin webmaster@localhost      documentroot /var/www     <directory />         options followsymlinks         allowoverride none          </directory>     <directory /var/www/>         options indexes followsymlinks multiviews         allowoverride         order allow,deny         allow     </directory>      scriptalias /cgi-bin/ /usr/lib/cgi-bin/     <directory "/usr/lib/cgi-bin">         allowoverride none         options +execcgi -multiviews +symlinksifownermatch         order allow,deny         allow     </directory>      errorlog ${apache_log_dir}/error.log      # possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     loglevel warn      customlog ${apache_log_dir}/access.log combined </virtualhost> 

any appreciated!!

in application/config/config.php change:

$config['index_page'] = 'index.php'; 

to:

$config['index_page'] = ''; 

it idea apache reload everytime change apache config file.

sudo /etc/init.d/apache2 reload 

or:

sudo service apache2 reload 

or:

sudo /etc/init.d/httpd reload 

(or whatever equivalent command platform)

for worth, here .htaccess

rewriteengine on rewritebase / rewritecond $1 !^(index\.php|static|robots\.txt|favicon\.ico|uploads|googlexxxxxxxx\.html|mobile.html) rewriterule ^(.*)$ index.php/$1 [l] 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -