-
Problem with my htaccess
Hello all,
I have a problem in my htaccess file, it's return me a 500 error.
My website : cseij.altervista.org
and my htaccess :
Codice HTML:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
Thanks if u can help me :D
-
1) Add RewriteBase and folder (root "/" or another folder "/folder/").
Codice HTML:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
index.php
Codice PHP:
<?php
if(!empty($_GET['url'])){
// if string start with "0"
// is empty
$i = 0;
$output = '';
while($i <= count($_GET) - 1){
$output .= "{$_GET[url]}<br></ br>";
++$i;
}
echo $output;
}
?>
if you have output yuor script work fine.