I am using Cakephp 2.0 and my website domain name is www.sample.com , If I try to access sample.com (with out www) then its going to www.sample.com this is fine. But My problem is my domain consists of lot of pages for example :
> http://www.sample.com/users/login
> http://www.sample.com/users/add
If I access the above url like http://sample.com/users/login then it redirect to
> http://www.sample.com/index.php?url=users/login
but it needs to redirect to
http://www.sample.com/users/login
I already written the following code .htaccess file(before the app folder) to redirect
Rewritecond %{http_host} ^sample.com [NC]
Rewriterule ^(.*)$ http://www.sample.com/$1 [R=301,NC]
Inside webroot folder I have one .htacces file that contain the following code may be that is the problem I think
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]