deepan
(Deepansrec)
April 24, 2012, 10:34am
1
Hi Friends,
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
'showScriptName'=>false,
),
i have using this url format,
but when i click contact, login it leads wrong url…
Note: i Dont want index.php in my Url
help on this
like Extension less url is need for me
abennouna
(Abennouna)
April 24, 2012, 1:28pm
2
from http://www.yiiframework.com/forum/index.php?/topic/7803-how-to-remove-index-php-from-url/
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'site/page/<view:\w+>'=>'site/page',
'<controller:\w+>'=>'<controller>/index',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<controller:\w+>/<id:\d+>/<title>'=>'<controller>/view',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
),
),
deepan
(Deepansrec)
April 25, 2012, 5:46am
3
Hi bennouna,
i have add this urlManager to fresh applications,
url is nice but, Not Found error in localhost
[b]"
Not Found
The requested URL /yii/testuserm/site/page/about was not found on this server."[/b]
can i remove index.php in root folder? is ther eany alteration i that code
abennouna
(Abennouna)
April 25, 2012, 9:19am
4
Have you amended your .htaccess as well?
Options +FollowSymLinks
IndexIgnore */*
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
deepan
(Deepansrec)
April 25, 2012, 9:50am
5
Have you amended your .htaccess as well?
Options +FollowSymLinks
IndexIgnore */*
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
Hi bennouna… in protected file having .htaccess and framework file also having .access file… little confusion in this
and can i paste above code directly to .htaccess file…
abennouna
(Abennouna)
April 25, 2012, 10:00am
6
You have to paste it in your webroot, not in protected
deepan
(Deepansrec)
April 25, 2012, 10:29am
7
Bennouna,
im working in localhost , it too confusing me…
my folder structure
www
[b]yii[/b]
[i]framework[/i]
.htaccess
[i]testuserm[/i]
protected
.htaccess
advance thanks, im newbie for this framework …
abennouna
(Abennouna)
April 25, 2012, 10:41am
8
If I were you, I’d leave alone the .htaccess in protected and in framework.
Create a new one from the instructions above and save it in testuserm
deepan
(Deepansrec)
April 25, 2012, 10:52am
9
If I were you, I’d leave alone the .htaccess in protected and in framework.
Create a new one from the instructions above and save it in testuserm
I got this error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
abennouna
(Abennouna)
April 25, 2012, 11:09am
10
Well sorry, I may have misunderstood your folder structure.
Where do you have your main script? Your index.php?
deepan
(Deepansrec)
April 25, 2012, 12:06pm
11
Well sorry, I may have misunderstood your folder structure.
Where do you have your main script? Your index.php?
in
1 www ->
2->framework… bla bla…
3->testusrm
->bla...
->index.php
actually fresh installed application
http://tellibus.com/ nice…work in yii?
abennouna
(Abennouna)
April 25, 2012, 12:42pm
12
So you have to put your .htaccess where your index.php resides
tellibus.com ? Well thanks. I don’t really find it nice. I have a new version but I haven’t finished its mobile version, so I’m just busy with clients projects.
And no Yii there. It just old plain HTML4 and PHP to retrieve the tweets by cron and to include them. I use a custom CSS grid based on 960.gs