• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
htaccess not working on my VPS with cpanel

#1
[eluser]Unknown[/eluser]
I have a website which was on a VPS with directadmin Control Panel, but I have just moved to another VPS with Cpanel. It used to work when it wan on the old VPS but in the new one I can't make it work..!!

I can open the main page (which is index.php) greatly but when I want to go to www.mydomain.com/news it shows me the main page. I have installed CI in the public_html folder (which is under home/user).

I have full admin access to my VPS, WHM/Cpanel and I can make any changes.

this is the htaccess that was working for me in my old VPS:


Code:
Options FollowSymLinks
<IfModule mod_rewrite.c>
    RewriteEngine on
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

#2
[eluser]Unknown[/eluser]
I have just found that by converting this line:

Code:
RewriteRule ^(.*)$ index.php/$1 [L]

to this one:

Code:
RewriteRule ^(.*)$ index.php/$1 [R]

means changing flag [L] to [R], it works, but it just converts www.domain.com/news to www.domain.com/index.php/news and shows in the addressbar and this not what I want.

Do you have any solution?!

#3
[eluser]web_developer[/eluser]
Hi,

I have also VPS, WHM/Cpanel and facing same problem like you..

did you found any solution for this? then please inform me...

Thanks


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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