regex - Remove 'index.php' from URL with .htaccess -


i've been trying sorts of solutions site , none seem work. i'm hosting hostgator. current .htaccess file:

<ifmodule mod_rewrite.c> rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php/$1 [l] </ifmodule> <ifmodule mod_suphp.c>     suphp_configpath /home/user/php.ini     <files php.ini>         order allow,deny         deny      </files> </ifmodule> 

this in root folder of site. have tried adding ? after index.php , no luck. know why isn't working?

this code can use in .htaccess (under document_root) remove index.php uri:

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

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -