I use CodeIgnter, because for the result, all my links are like base.com/index.php/home/indexor www.base.com/index.php/home/index. I would like to display them only as base.com/home/indexif possible. I tried to take a look through the Internet, got a rewriting in htacces from both of them, like:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$0 [PT,L]
RewriteCond %{HTTP_HOST} ^domain\.com\$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.com\$
RewriteRule ^/?$ "http\:\/\/domain\.com\/" [R=301,L]
and
RewriteEngine on
RewriteCond %{HTTP_HOST} !^domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
put them separately, they work. But they do not do what I need. Does anyone know a solution? Thanks.
source
share