php - htaccess not working properly- 500 internal server error -


.htaccess not working , apache configuration , install apache,php7,mysql seprate, enable mod_rewrite, when in htaccess type give me 500 internal server error

<ifmodule mod_rewrite.c>  # turn on rewrite engine rewriteengine on  # rewrite rule  #rewriterule ^detail detail.php [nc,l]  # nc makes rule non case sensitive # l  makes last rule specific condition match  # rewrite detail.php?id=1  rewriterule ^detail/([0-9a-za-z]+) detail.php?id=$1 [nc,l]   # rewrite detail.php?id=1&title=title  rewriterule ^detail/([0-9]+)/([0-9a-za-z]+) detail.php?id=$1&title=$2 [nc,l]   <ifmodule> 

internal server error

the server encountered internal error or misconfiguration , unable complete request.

please contact server administrator @ admin@example.com inform them of time error occurred, , actions performed before error.

more information error may available in server error log.

the trailing <ifmodule> should </ifmodule>. is opening second block.

<ifmodule mod_rewrite.c> # turn on rewrite engine rewriteengine on # rewrite rule #rewriterule ^detail detail.php [nc,l] # nc makes rule non case sensitive # l  makes last rule specific condition match # rewrite detail.php?id=1 rewriterule ^detail/([0-9a-za-z]+) detail.php?id=$1 [nc,l] # rewrite detail.php?id=1&title=title rewriterule ^detail/([0-9]+)/([0-9a-za-z]+) detail.php?id=$1&title=$2 [nc,l] </ifmodule> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -