apache - Get URI params without index.php -


i have url http://example.com/index.php/fruit/1a2b3c

i want uri's have written code.

now want remove index.php visible url, should work when url http://example.com/fruit/1a2b3c , should still point index.php

i on apache2 using php 7

add following code .htaccess file.

options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase /  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?$1 [l,qsa]  rewritecond %{the_request} ^[a-z]{3,}\s(.*)/index\.php [nc] rewriterule ^ %1 [r=301,l] 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -