Magento Remove index.php from URL - magento

I have multiple websites installed in one Magento, and for one website, I have a full view store(www.example.com) and mobile view store(www.example.com/mobile). I have taken off the index.php from full store, but for somehow, it cannot be taken off from mobile store, I double checked, (1) Use Web server Rewrites set to yes (2) Use secure Url in frontend to yes (3) .htacess Rewrite Engine on and RewriteBase/. I cleared the Magento cache several times and I even reindexed. Why the index.php is still there?
Here is part of .htacess file.
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
RewriteBase /

There are few step to remove index.php from url
Step1:Admin>System > configuration>General>WEb>Search Engine optimization
Use Web Server Rewrites enable to yes
Also Enable mod_write of apache

Follow the below steps to remove index.php from URLs in Magento
Step 1:
* Goto to your site root folder and you can find the htaccess file there.Open it on text editor and find the line #Rewrite Base/magento.
* Just replace it with Rewrite Base/
Step 2:
* Then goto your admin panel and enable the Rewrites(set yes for Use Web Server Rewrites).
* You can find it at System->Configuration->Web->Search Engine Optimization.
Step 3:
* Then goto Cache management page (system cache management ) and refresh your cache and refresh to check the site.

Try the Steps I have written in this blog post :
http://magentowebmaster.blogspot.in/2013/11/magento-admin-url-rewrite-set.html

Related

can magento add store with different subdomain?

it's my first time to use magento
my main domain for exmple domain .com with centos OS
my magento on store.domain .com with Ubuntu 16
can i use the same Ubuntu server for another store with sub domain store2.domain .com ?
P.S my main domain domain .com uses wordpress Cms
thanks
Yes. You Can add store with different subdomain. Follow below steps:
Go to admin then select tab System->manage stores
Click create store view and complete the form and save store view
Change the Base URL for each Store view
1.Go to admin then select tab System->configuration
2.On the left side of the page General under that select web but before that you have to change the Current Configuration Scope to your store view name
3.Edit the base url to you subdomain(eg: http://en.yourdomain.com)
4.click save config.
Change .htaccess for redirecting to store view if you call the subdomain
1.Your .htaccess file is at the root folder of magento.
2.Search for "RewriteEngine on" word in .htaccess file and write the code below it
RewriteCond %{HTTP_HOST} ^en.yourdomain.com
RewriteRule ^ - [E=MAGE_RUN_CODE:english]
RewriteCond %{HTTP_HOST} ^fr. yourdomain .com
RewriteRule ^ - [E=MAGE_RUN_CODE:french]
then save the .htaccess file and try to clear all cache and browsing history from your browser as well as from magento.

Magento admin redirects to 404 page after login

I'm struggling to set up Magento 1.9.1 on Godaddy for the few hours. I've managed to get all URLs work, except admin, which renders a 404 page with Magento's "Whoops" message just after logging in with the right password.
The URI: /index.php/admin/dashboard/index/key/b4a2c39042dae9efe5b17e98e93d5f64/
Changing the core library files as suggested in other topics didn't make any difference.
I had the same trouble, I have resolved it editing .htaccess. My Magento installation is in a subdirectory of my hosting. I have removed the # on the RewriteBase line and added the right value for the subdirectory.
in .htaccess :
RewriteBase /magento_directory/

How to change the base link url in magento

I have changed the Base Link Url(base link url) ( not the base url) . Now my site is not accessible except for the home page. How to solve this ? . This option is not visible in core_config_data table too.
I am using magento 1.8.
I changed it system -> web -> unsecured -> base link url .
Now I am not able to access anything in my site. as am getting two index.php in the url.
Go to your root folder and look for .htaccess
In that file scroll down (to line 123) a bit until you find a line of code that is commented out, should be similar to:
RewriteBase /magento/
Change that line to
RewriteBase /

how to redirect a link in my website to an external link?

I have provided a link from my web site in my andoird app which is:
www.mysite.com/support
And i want this link to be redirected to:
www.anothersite.com
i have already tried com_redirect and entered support as source and http://ww.anothersite.com but i dont get any redirects and i get 404 error.
I am running Joomla 3.x and i want to know how i can do this with URL rewrites and no external components.
It seems not possible to do it within the Joomla backend (i tried many combination of menu items and the redirect module).
For sure you can write your redirect directly in your .htaccess (if you are using it) like this:
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^support/?$ http://www.anothersite.com/ [R=301,NC,L] # Permanent Move
or
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^support/?$ http://www.anothersite.com [R,NC,L] # Temporary Move
More info about URL rewriting and .htaccess are here: http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/

Generating sitemap.xml on multi stores

I have setup multistores on one Magento installation and all the stores are on different servers. I have created symlinks for each of them.
Now I want to generate sitemap.xml for each store. I have created a folder called sitemaps on my root directory, inside sitemaps I’ve created folders for each store. (i.e. store1, store2 inside sitemaps). Now I’m generating sitemap.xml inside them folders for each store. I’ve also add the following line in .htaccess of store1.com:
RewriteRule ^sitemap.xml$ http://www.mainserver.com/sitemaps/store1/sitemap.xml [NC]
(found this help here: http://www.magentocommerce.com/boards/viewthread/59388/)
Now if I type www.store1.com/sitemap.xml, I should be able to see the xml for that store but I’m getting 404 Not Found error.
Any ideas?
Copied from Magento stack
NOTE: I tried this way it always works.
First, create a new folder called sitemaps in the root of your website, then create subfolders for each domain.
/sitemaps/domain_1/
/sitemaps/domain_2/
Then login to the Magento admin and navigate to – catatlog -> google sitemap
Create or edit the sitemap listings for each store and set the “path to sitemap” field to be the path you created for the store.
/sitemaps/domain_1/
/sitemaps/domain_2/
Update your robots.txt file. To make sure that the search engine spiders are properly directed to the new sitemaps. You may need to update or create the robots.txt file. Edit the robots.txt file and add the following lines at the top —
# Website Sitemap
Sitemap: http://www.domain_1.com/sitemaps/domain_1/sitemap.xml
Sitemap: http://www.domain_2.com/sitemaps/domain_2/sitemap.xml
Finally, if your site uses the Apache web server engine, you should update the .htaccess file in the root of your website to direct any other sitemap requests to the proper place.
Locate the following line below the line that reads — RewriteEngine on
And add the following redirect statements below it —
# Sitemap: http://www.domain_1.com/sitemaps/domain_1/sitemap.xml
RewriteCond %{HTTP_HOST} ^.*domain_1\.com$
RewriteRule ^sitemap.xml$ sitemaps/domain_1/sitemap.xml [NC,L,R=301]
# Sitemap: http://www.domain_2.com/sitemaps/domain_2/sitemap.xml
RewriteCond %{HTTP_HOST} ^.*domain_2\.com$
RewriteRule ^sitemap.xml$ sitemaps/domain_2/sitemap.xml [NC,L,R=301]

Resources