.htaccess - Redirect to another page instead of index.php through htaccess -


when first time load page instead of index page should redirect page. after when clicked on home page redirect home page. have done through htaccess. , wanted open database link put below code.

directoryindex inventory.php

< ifmodule mod_rewrite.c >   rewriteengine on   rewriterule ^mega_dados/.*$ - [pt] </ifmodule > 

above code working first time page load rewrite rule not working. if i'll comment first line rewrite rule working directory index not working. wanted both. how can resolve it.

depends need exactly, use cookies redirect @ first visit. first visit, index.php not find cookie , goes start.php

index.php:

<?php     if (!isset($_cookie['mycookie'])) {         header("location: ./start.php");         exit();     } ?> 

start.php:

<?php    if (!empty($_post['waarde']))    {           setcookie ('mycookie', 'yes', time() + 3600);         header("location: ./index.php");         exit();   } ?>        <form method="post" action="">       <input type="radio" name="waarde" value="1" checked="checked"><b>yes</b>       <input type="radio" name="waarde" value="0"><b>no</b>       <input class="mybuttons" type="submit" value="accept">       </form> 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -