Description:
I have almost 4,000 articles and now i want the SEF URLs for them all based on alias of each article is it possible if i can achieve this without creating menu items?
i.e (www.websitename.com/article-alis)
Problem:
I know i can achieve this if i create menu items for them all but i don't want to create 4,000 menu items and want some quick and easy way but based on article alias so i can change it whenever i want.
Thanks, Aamir
UPDATE
If you want make that, you must do rename htaccess.txt (for activate SEO Control) and modify your .htaccess (on main folder site) and peraps create your propers rules.
First : Have you renmae the htaccess.txt file (on main folder site) to .htaccess?
is here where contain all rules for rewriting!
Example: RewriteRule ^folder1.*$ http://example.com/folder2/ [R=301,L]
On this example, all article start on folder name folde1is rewrite by folder2
You can see more : https://mediatemple.net/community/products/dv/204643270/using-htaccess-rewrite-rules
or for Joomla 3 rewriting : https://docs.joomla.org/Enabling_Search_Engine_Friendly_%28SEF%29_URLs
Related
I need to create geo subdomain for one city (for example shop.com & london.shop.com). I want the same store. But also I want to have different pages like:
london.shop.com/contacts & shop.com/contacts.
I use magento 1.9.2.1
you need to create multiple websites and store for different domain.create one folder on root and put index.php and .htaccess file and change in index.php store name or website name at last.
Please refer below link
http://inchoo.net/magento/how-to-set-multiple-websites-with-multiple-store-views-in-magento/
I am trying to integrate multiple magento sites within the one installation. From what I have found i need to use a parked domain method however I have tried various methods to get it all working however I keep getting the 2nd store redirecting to the main store so I am looking for the best method to allow me to run multiple websites.
Any help is greatly appreciated
We currently have 4 stores all sharing one Magento installation & set of products. Each has it's own unique URL.
Create your Stores
Go to System -> Manage Stores
Click on Create Website. In the Name field, enter your store name. In the Code field, enter a unique code [lowercase & without spaces - we're going to give it a code of domain1 for our example] (to be used later) & Save.
Click on Create Store. In the Website field, select the website from step 2. In the Name field, enter a name. In the Root Category field, select the Root Category for your store & Save.
Click on Create Store View. Select the store you just created (from the dropdown menu) for Store. Type a name for your store in the Name field (Example from Magento is English Store). In the Code field, enter a unique string to identify the store view (just like for your store). Change the Status to Enabled & Save.
Repeat for all your stores
Configure your stores in the Magento Admin Configuration Section
Go to System -> Configuration
In the Store Scope (top-left dropdown), choose your first Store.
Choose Web from the Left-side menu
Open the Unsecure & Secure sections
Change the domains to what they would be (i.e. - http://www.domain1.com/) Don't forget the trailing slash at the end
Repeat for all stores
Server Config (for Magento versions 1.4.0.1 and greater)
Point your domain (e.g. - www.domain1.com) to your server where your single Magento instance is installed
Set up a Pointer/Parked domain on your server (see your Host's instructions or contact them)
In the .htaccess file on the root of your install, put in the following code for each of your stores
SetEnvIf Host .*domain1.com
MAGE_RUN_CODE=domain1 <- This was your important code from step 2 under Create your Stores SetEnvIf Host
.*domain1.com MAGE_RUN_TYPE=website
This set of 2 must be repeated for every domain you have.
For our particular stores/domains (might find useful)
Some servers, particularly those running Litespeed Web Server, the SetEnvIf directive does not get recognized in the .htaccess file. This was particularly true for us.
We had to do the following
Find RewriteBase / or RewriteBase /magento/ or etc
RewriteCond %{HTTP_HOST} .domain1.com [NC]
RewriteRule . - [E=MAGE_RUN_CODE:domain1]
RewriteCond %{HTTP_HOST} .domain1.com [NC]
RewriteRule . - [E=MAGE_RUN_TYPE:website]
We also have symlinks set up on our server (under each or our domains) to point to our main domain's folders (for the app, includes, js, lib, media, shell, skin, var)
Multi Store in Magento v1.6.2
in the VirtualHost configuration set the DocumentRoot to where you have your Magento installed (something like /var/www/magento), so it will be the same for every domain as we want only one Magento install for each domain
in Magento's admin, go to System -> Manage Stores and create your websites with their stores and store views (before that you'll have created one root category for each website). Reindex after everything is created
go to System -> Configuration and change the scope (the dropdown on the upper left) to one of the website. Go to the (General) Web -> Unsecure tab, uncheck the "Use Default" and indicate the domain in the Base URL field. Do the same for the secure
open the .htaccess at the root of your Magento install and at the end of it add the rules to determine which website to show according to the domain. For example, if you have set the codes website1 for domain1.com and website2 for domain2.com, put this:
SetEnvIf Host ^domain1.com$ MAGE_RUN_CODE=website1
SetEnvIf Host ^domain2.com$ MAGE_RUN_CODE=website2
SetEnv MAGE_RUN_TYPE website
and you're all set :)
HTH
Did you change your base urls for the second store configuration?
Navigate to:
System>Configuration>Web>Unsecure
System>Configuration>Web>Secure
Then change the Current Configuration Scope (top of left sidebar): your second store config
Deselect use default and enter your second store's path:
Base URL : http://yourdomain.com/
Secure Base URL: https://yourdomain.com/
I had a long ugly long URLs for Joomla articles. Being advised here to enable SEF, I got:
www.domain.com/cat1/subcat1/120-results-of-DES-project-in-2011
Nicer, but I also want custom short URL for specified article, like:
www.domain.com/des
Is this possible in Joomla 1.5? Simply adding rule to .htaccess is possible but not what I'd like, because:
I'd prefer that the short URL remains in the Location bar after the page is loaded
Joomla to use that short URL whenever the articles is clicked from news etc.
(P.S.: if it's not possible, then I'd be happy with some simple URL "aliaser" for Joomla, which would work similarly to .htaccess, but preferably with short URL remaining in the browsers' location bar.)
As Trev mentioned you need to turn on SEF URLs. In the admin, in the Site menu click on Global Configuration. In the Site configuration you should see a box for SEO settings. Turn on all 3 options unless you don't want the .html suffix, that one can be left off.
Now Joomla will create URLs like this -
www.yourdomain.com/parent-menu-alias/child-menu-alias/article-alias.html
If the menu item is linking directly to an article, then it would be -
www.yourdomain.com/menu-alias.html
Have you enabled SEF and htaccess in the Global Configuration? If you do then the URLs to any articles is controlled by the article's alias. e.g. if you want an article to be
http://mysite.com/my-url just open the article in the article manager and change the Alias field to my-url
I've copied an existing joomla site from one domain to another, but when I hit the menu items it redirects to the old domain articles. Where is the setting to change this?
Thanks
Narkoz's answer isn't correct, there isn't an option to set your site domain in the joomla backend.
The problem isn't that joomla doesn't know your site URL, it gets that from you server, but rather the menu links are probably hard coded. Check your menu links in the backend and make sure the point to an "internal" link of some kind.
Set $live_site variable in your configuration.php file by adding this line:
$live_site = "http://www.example.com";
Export the database to SQL file then open it with a text editor and do a search/replace
Search : old-site-url.com
and replace it by : new-site-url.com
Save your file and import it to the database.
I need to rewrite url in joomla. But the url should not be showing "index.php" and no numbers (0-9) as well.
1st condition:
The url cannot be " http://www.abc.com/index.php/components/article" rather than it should be "http://www.abc.com/components/article".
2nd condition:
the url cannot be "http://www.abc.com/components/article/9" where it contains 9 number .
How can this be done?
Joomla comes with htaccess.txt, and the option to rewrite urls. So you have to first change the htaccess.txt file to .htaccess on the server, then login and in the configuration settings change SEF to on, and use .htaccess to on.
In support of the answers from gnomeontherun and Hennie. You have some control over how the url is made up by joomla, through the menu structure and the alias for the each menu.
Sometimes it's worth creating menu items even if you don't show them on a menu on your site.
e.g.
Menu structure:
Home
-Latest News *(Could be a category blog view)*
--News article 1 *(Link to article but this level need not be shown on menu)*
--News article 2 *(Link to article but this level need not be shown on menu)*
url should look like:
/latest-news *(for the blog view)*
/latest-news/news-article-1 *(for the article view)*
If there is no menu item which relates to an article, Joomla makes up the url itself using category+id/article-alias+id etc. If it does find a menu item, it will use the structure of the menu instead.
Joomla uses the alias of the menus for the actual content:
i.e. menu-alias-level1/menu-alias-level2/news-article-1
Using this method from the beginning will allow you to keep your urls consistent whether they are accessed through the blog page route or directly. This will help with your SEO.
Of course it can be a pain to create a menu item for every article but I know some Joomla guys who swear by it and will do it even for thousands of pages...
for the index part ...
Perhaps this will work for you too
RewriteRule ^index\.php$ http://www.yourdomain.com/ [R=301,L]
or
Redirect 301 /index.php http://www.yourdomain.com
To get rid of the 'index.php':
Rename the htaccess.txt file to .htaccess
In the backend, turn on SEF URLs and URL rewrite
Joomla will then show your article using something like "http://www.example.com/category/article/9", unless you assign a menu item to that article. There is no need to show that menu, so you can create new menu, call it 'hidden' (or any other valid name) and do not publish the module.
A more comfortable option is to use one of the many SEF components, which make it much easier to manage the URLs. Most if them additionally provide meta data control.