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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -