php - How to set an index page in a subfolder -
i have following file/folder structure site:
index.php games.php /category-games /category-games/game-1.php /category-games/game-2.php
the file games.php
supposed category homepage /category-games/
. there way make page show when visits mysite.com/category-games/
? tried put page folder , called index.php guess that's not working.
probably need via .htaccess. can me this? right if tries access mysite.com/category-games/
its going straight 404.
cheers!
case 1: if /category-games/
has no .htaccess place rule in root .htaccess:
rewriteengine on rewriterule ^category-games/$ games.php [l,nc]
case 2: if there .htaccess inside /category-games/
use rule
rewriteengine on rewriterule ^/?$ /games.php [l]
Comments
Post a Comment