aguskianto 0 Posted August 15, 2013 Report Share Posted August 15, 2013 Hi everyone! I am trying to create a clean URL for yii_cms application. I install xampp (c:/xampp) and I delete # sign in httpd.conf (this line: LoadModule rewrite_module modules/mod_rewrite.so). Then, I create .htaccess in C:/xampp/htdocs/yii_cms folder..htaccess file contains these lines:<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)\?*$ index.php/$1 [L,QSA]</IfModule>Then..., I edit main.php at C:/xampp/htdocs/yii-cms/protected/config/main.php and add two lines in bold format: 'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, 'caseSensitive'=>false, 'rules'=>array( '<controller:\w+>/<id:\d+>'=>'<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', ), ), I restarted apache service through xampp control and I get this error while accessing the page (http://localhost/yii...page?view=about) <= local server Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.If you think this is a server error, please contact the webmaster.Error 404localhostApache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16What is wrong with my page if I access with no index.php? If I access them using index.php, everything is OK.Please, help me with these errors. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.