I want to ask how can we add an additional rewrite rule(s) in .htaccess file including the index.php removal rule in codeigniter.
Here is my .htaccess file
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^profile/([0-9]+)$ /index.php/front/profileDetail/$1
RewriteRule ^(.*)$ /index.php/$1
The problem is that, only one of the rule works at a time. If I save the file as shown above it returns internal server error!
What I want is completely remove index.php file plus rewrite the url from xyz.com/front/profileDetail/50 into xyz.com/profile/50
Please help what’s wrong, I am completely newbie in this regard.
Thanks! in advance.
To elaborate on my comment above, in config/routes, you would put: