apache - Enable rewrite to internal sub folder and add slashes to access files -
i need enable htaccess rewrite url sample bellow:
home http://test.com/ -> /view/template/index.php rewritebase /view/template/ rewrite other file or directory css/ js sample
content url http://test.com/post/12345 -> /view/template/post.php?id=12345
i try
rewriteengine on # rewrite default theme dir rewriterule ^(.*)$ /app.view/assis/$1 [l,nc] rewriterule ^(.*) $1 [l] rewriterule ^post/$ /app.view/assis/post.php?id=31 [l]
can us!
i don't think following rule useful @ all:
rewriterule ^(.*) $1 [l]
as question, try:
rewriterule ^/?$ /app.view/template/index.php [l] rewriterule ^post/(\d+)/?$ /view/template/post.php?id=$1 [l]
Comments
Post a Comment