Issue
my url is like
e.g http://me.mydomain.com/admin/view/1
that url is reached by clicking a list item from
e.g
http://me.mydomain.com/admin/list
hence the number 1 in the first url stands for an ID.
but when I manually put something like this in the url
e.g
http://me.mydomain.com/admin/view/asdfasdf1234
and pressed the enter key of the keyboard, I am getting an error that says
Unable to resolve the request "http://me.mydomain.com/admin/view/asdfasdf1234".
how to handle this error ?
Solution
In my case, I took files from GIT repository in to my windows , localhost dev environment and it gave me error URL not found Error404 , something like that.
Step1- Change config/main.php as follows
'urlManager' => array(
'urlFormat' => 'path',
'showScriptName' => false,
'rules' => array(
'/' => '/view',
'//' => '/',
'/' => '/',
),
)
Step-2 Now modify ur application .htaccess file , which shoul be outside just protected folder some rewite-rules as follows.... 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
Step 3- Restart your apache.and check in browser
Step4- Change http.config with Allow Override All , inplace of None.(For security point of view recheck this step).
This may or may not help you
Answered By - vpdeva
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.