php - Htaccess : making Fake folder to get accessible/ -
i have created folder http://domain.com/sport/ 
what need show contents of http://domain.com/sport/index.php whenever access http://domain.com/sport/anything/anything/.
right showing contents of http://livesports.pw/index.php
i tried code below, it's not working.
rewriteengine on rewritebase / rewriterule ^(.+)\/$ $1/ [r=301,l]   note : folder /sport/ example folder. can vary. if more folder created, must work new ones.
replace code this:
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase /  rewritecond %{request_filename} !-d [or] rewritecond %{request_filename} !-f [or] rewritecond %{request_filename} !-l rewriterule ^ - [l]  rewriterule ^([^/]+)/?$ /index.php [l]  rewriterule ^([^/]+)/(.+?)/?$ /$1/index.php [l]      
Comments
Post a Comment