Author Topic: Add on domain secure path? / removing /componets/virtuemart/ path from link?  (Read 10333 times)

mbit

  • Jr. Member
  • **
  • Posts: 323
I have created a joomla with virtuemart in a subdirectory of an existing server i have.
my site is in public_html/shop/...
i made an addon domain so i can have 2 domains in one server. so my shop sas like www.my1site.com/shop
and now with the addon domain is www.my2site.com
when i logged to joomla( www.my2site.com/administrator) and went to virtuemart component it logged me of and asked me to log in from my1site.com/shop/administrator . so i went to  administrator\components\com_virtuemart\virtuemart.cfg.php
 and changed the
define( 'URL', 'http://www.my1site.com/shop/' );
to
define( 'URL', 'http://www.my2site.com/' );
and it worked. no more logging of when i go to virtuemart from site2.
1. Should i change the  SECUREURL also to the add on domain path? or not?

2. i enabled seo settings from joomla and installed vmSEF extension.  now when i reach a virtuemart page i have the path : mysite2.com/components/virtuemart/  is there a way to remove the /componets/virtuemart/ path ?

thanks in advance,
Costas

beachy

  • Jr. Member
  • **
  • Posts: 277
  • VirtueMart Version: 2.0.22
In terms of setting up your secure URL it is important that they both point to your current URL. If you dont, when you enter a secure area of your website such as the checkout it will direct the use to the secure URL which could point to your old website!

Answering your second question you should contact the developers of vmSEF. I have not used vmSEF so I couldnt comment beyond that. But I am sure there are others on the forum who can help you on this!
_______
Joomla 2.5.11 Virtuemart 2.0.22
Apache 2.2.24 PHP 5.4.13
Hosted By RochenHost.com - MVS

mbit

  • Jr. Member
  • **
  • Posts: 323
thanks you for your fast reply. i changed secureurl also as you advice me.

In Joomla->Virtuemart->admin->Configuration->Security is a field called more Core settings. says homepage and errorpage. before i change to the addon domain there i had the name of the folder the site  shop.index and shop.error
now that there is not shop what should i change it with?

as for the 2. i disable the vmsef plugin and when i reach the product categorys the link is still components/virtuemart. seems that path has nothing to do with the plug in. Any ideas how to change that to nothing?

beachy

  • Jr. Member
  • **
  • Posts: 277
  • VirtueMart Version: 2.0.22
I would personally leave it as shop.index and shop.error These options specify firstly the default page loaded and secondly the page which will be displayed if there is an error on your virtuemart site.

If you want to get rid of the /componets/virtuemart/ and make your URL's like my site (http://www.puretree.co.uk) then you need to enable joomla SEO links. Alot of people seem to have issues with it. But I have never had a problem! Alternatively use router.php or an SEO extension, there are alot of threads on the forum about all of them.
_______
Joomla 2.5.11 Virtuemart 2.0.22
Apache 2.2.24 PHP 5.4.13
Hosted By RochenHost.com - MVS

mbit

  • Jr. Member
  • **
  • Posts: 323
If you want to get rid of the /componets/virtuemart/ and make your URL's like my site (http://www.puretree.co.uk) then you need to enable joomla SEO links. Alot of people seem to have issues with it. But I have never had a problem! Alternatively use router.php or an SEO extension, there are alot of threads on the forum about all of them.
But in your site you are not using sef for virtuemart. i am looking for a solution that i can have the category name & the product name in the address(without id number & the path"/components/virtuemart/" .

any other suggestion are welcome.

beachy

  • Jr. Member
  • **
  • Posts: 277
  • VirtueMart Version: 2.0.22
Take another look!
_______
Joomla 2.5.11 Virtuemart 2.0.22
Apache 2.2.24 PHP 5.4.13
Hosted By RochenHost.com - MVS

mbit

  • Jr. Member
  • **
  • Posts: 323
Take another look!
which sef you are using for virtuemart??
how did you disappear "/component/virtuemart/" path?

beachy

  • Jr. Member
  • **
  • Posts: 277
  • VirtueMart Version: 2.0.22
Have you got a link to your live site so that I can have a look? What SEF have you got enabled at the moment?
_______
Joomla 2.5.11 Virtuemart 2.0.22
Apache 2.2.24 PHP 5.4.13
Hosted By RochenHost.com - MVS

mbit

  • Jr. Member
  • **
  • Posts: 323
Have you got a link to your live site so that I can have a look? What SEF have you got enabled at the moment?
i am working in localhost. i have disenabled vmSEF and only working with joomla sef. when i reach a contect of virtuemart like basket or a product the address include the path
"../components/virtuemat/.."

beachy

  • Jr. Member
  • **
  • Posts: 277
  • VirtueMart Version: 2.0.22
Ok can you post a copy of you .htaccess file!
_______
Joomla 2.5.11 Virtuemart 2.0.22
Apache 2.2.24 PHP 5.4.13
Hosted By RochenHost.com - MVS

mbit

  • Jr. Member
  • **
  • Posts: 323
can i edit the path of the component from htaccess?
Code: [Select]
##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

 RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

#RewriteBase


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
[code]
[/code]

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
I run multiple sites/domains through one VM store, and use metamod to change out information accordingly.

The URL setting in VM pose a slight problems, but can be overcome by adding a php statement in the VM config file.

Find in virtuemart.cfg.php:
Code: [Select]
define( 'URL', 'http://www.yourdomainhere.com/' );
define( 'SECUREURL', 'https://www.yourdomainhere.com/' );

Change to:
Code: [Select]
if ($_SERVER['HTTP_HOST'] == "www.yourSECONDdomainhere.com") {
define( 'URL', 'http://www.yourSECONDdomainhere.com/' );
define( 'SECUREURL', 'https://www.yourSECONDdomainhere.com/' );
} else {
define( 'URL', 'http://www.yourdomainhere.com/' );
define( 'SECUREURL', 'https://www.yourdomainhere.com/' );
}

Works like a charm for me. Watch out for caching issue if you use site caching. Separate menu systems work best to avoid cache issues if you want to use it.

mbit

  • Jr. Member
  • **
  • Posts: 323
I managed my issue with a different way. I created a menu that links to virtuemart with alias name "store". so at the button of the categories which was mysite.com/components/virtuemart , i changed the link to mysite.com/store :)

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
I think I mis-understood you. Glad you got it.

mbit

  • Jr. Member
  • **
  • Posts: 323
I am using VMsef now and with character replacement and everything works fine except the links for the manufactures. When i select a manufacture , the url is : ..store?page=shop.browse&manufacturer_id=25
why this doesnt change as the categories ? any ideas how to solve that?

thanks in advance