I use HTTPS as the main URL and as per the recommendations of Google SEO, I have to install the following redirects
The redirects that I set up work fine for the main page. However, only the first works for internal pages, and the second and third add index.php to the URL.
Example
https://www.example.com/index.php/mobiles/apple/apple-iphone-se at https://example.com/index.php/mobiles/apple/apple-iphone-se
I am using the following code in .htaccess
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* ? [F,L]
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^52\.34\.179\.108
RewriteRule (.*) https://priceoye.pk/$1 [R=301,L]
- : AWS (httpd)
- URL: PriceOye [dot] pk