开发者

codeigniter : how to set htacces file in rackspace

开发者 https://www.devze.com 2023-02-12 08:33 出处:网络
I hosted my site on rackspace server, I use codeigniter, I have to r开发者_如何学Pythonemove index.php from the url, I used .htaccess file that I use in other shared hosting server, but its now workin

I hosted my site on rackspace server, I use codeigniter, I have to r开发者_如何学Pythonemove 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

0

精彩评论

暂无评论...
验证码 换一张
取 消