I have a problem when i’m trying to enable urlmanager with “controller/admin”, the first page show correctly.
When i click to view second page a pop-up appear with this error code:
Error 404: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /localhost/archivos/admin/archivos/admin//Archivos_page/2 was not found on this server.</p>
<hr>
<address>Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 Server at localhost Port 80</address>
</body></html>
public function actionAdmin()
{
$model=new Archivos('search');
$model->unsetAttributes(); // clear any default values
if(isset($_GET['Archivos']))
$model->attributes=$_GET['Archivos'];
$this->render('admin',array(
'model'=>$model,
));
}
.htaccess:
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
<FilesMatch "^\.(ht)|\.(pdf)$|(\.*~)$">
Order Allow,Deny
Deny from all
</FilesMatch>
# otherwise forward it to index.php
RewriteCond $1 !^(index\.php)
RewriteRule ^(.+)$ index.php?$1 [PT,L,QSA]
it only happens if i enable the urlmanager, but i really need it.
Ah, OK. I could reproduce your problem with your settings.
I think the problem is in your .htaccess.
Would you please try to modify your .htaccess like this?
<FilesMatch "^\.(ht)|\.(pdf)$|(\.*~)$">
Order Allow,Deny
Deny from all
</FilesMatch>
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php