简体   繁体   中英

codeigniter : how to set htacces file in rackspace

I hosted my site on rackspace server, I use codeigniter, I have to remove index.php from the url, I used .htaccess file that I use in other shared hosting server, but its now working my files are at /var/www/html/ my htaccess file is

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$index.php/$1 [L]

Its working fine in local server ( also in other shared hosting server)

How can I fix this ?

Thanks a lot

make sure you have mod_rewirte installed

sudo a2enmod rewrite <- make sure its enabled

make sure the .htaccess file is readable by www-data or what ever user apache is running as

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM