Showing posts with label SEO URL. Show all posts
Showing posts with label SEO URL. Show all posts

February 11, 2014

Removing index.php from Magento URL

How to Remove .php extension from Magento URL
Here is the solution to remove magento url.

You need to enable mod_rewrite apache server.
Log in to magento admin area.
After that Select System(Probably last menu item) -> Choose Configuration.
Now from left menu panel, under General Section, select web option,
Then in Search Engines Optimization,
Set use web server rewrites to yes.
click on Save configuration to save.

Then Go to the Cache Management under System menu 
Flush magento cache and flush cache storage .
refresh and check the site.

Cherrs  :).

January 23, 2014

Yii remove index.php from URL and SEO URL tips


This one is using for removing index.php and also remove site portion from URL.

I am trying to remove index.php from the URL string for so many times. Finally i got some cases in which i want to share with you guys.


Verify mod_rewrite is enabled in your server you can check it to load php.ini file.

Just copied following code and paste into urlManager in main.php
Here's what I put under components file main.php:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
//'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'/'=>'site/index',
'blog'=>'post/index',
'<view:(about)>'=>'site/page',
'contact'=>'site/contact',
'login'=>'site/login',
),
//'urlSuffix'=>'.html',
),

Also,
You can make your own rule to your web page need:
Here, i have changed site/login to login and site/contact to contact.
Also , post/index to blog as you can see in the rules array.

Hope this is one helps you in many ways.