Answer the question
In order to leave comments, you need to log in
How to remove index.php from url?
Good afternoon. The site uses Stalker cms. And such a problem that there is a duplication of pages by adding index.php to the url.
The second day I suffer, I don’t know what to write in .htaccess to make a redirect. Does anyone know and can help?
Answer the question
In order to leave comments, you need to log in
And if at the top of the php executable file referenced by rewrite write like this? (But this is without htaccess edits)
<?php
if (strpos("index.php",$_SERVER["REQUEST_URI"]) !== false) {
header( "location: ".str_replace("index.php","",$_SERVER["REQUEST_URI"]),301,true);
exit;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question