I have installed the Joomla 2.5.9 on Windows server with IIS7 . :)
I disabled all the SEF setting in configuration.
Now , I logged in to admin of joomla 2.5.9. When I see the public side , it show it perfect.. but when I go for any other link.. it have multiple time of domain name in url..
like...
http://domainname.com/index.php?option=com_content&view=article&id=6&Itemid=102
I tried with enabling SEO URL , and enabled the web.conf. and settings like below,
Search Engine Friendly URLs -yes
Use URL rewriting -yes
Adds Suffix to URL -yes.
http://domainname.com/domainname.com/features.html
is this error with joomla 2.5.9???
Thanks,
Gaurish
http://forum.joomla.org/viewtopic.php?f=615&t=820080
Change in configuration.php
var $live_site = '';
to
var $live_site = 'http://domainname.com';
I tested with some configuration & that works for me..
I tried JTC code,
public $live_site = 'http://domainname.com';
It works on front-end, but throws the error in backend , even I am not able to Login in admin.
So, I changed the configuration file as below,
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (true== strpos(strtolower($url),'administrator')) :
class JConfig {
.......
public $live_site = '';
......
}
else:
class JConfig {
......
public $live_site = 'http://www.domainname.com/';
.....
}
endif;
and this work perfectly for me.. all the URL's on front-end are showing correct, not domain name repeated.
But URL's in back are showing same as early, but I can do the updates & admin task there.. that really don't interrupt me.
One more think , I am not able update global configuration file.. as we edited it .. so I need do it manually.
Thanks,
Gaurish
Related
I am new in cs cart.
I have done the following steps
1.downloaded a cs-cart-V3 website to my localhost.
2.Change database setting,and import database.
3.$config['http_host'] = 'localhost'; added in **config.local.php** file.
4.Removed .htaccess file from root folder.
My problem is
The site was loaded,But the path of css is wrong.It is trying to load from localhost Not from localhost/subfolder,
Where i need to change this?
Please check config.local.php
Mainly the following lines:
// Host and directory where software is installed on no-secure server
$config['http_host'] = '';
$config['http_path'] = '';
Please make sure that the store-front URL is also correct. It can be checked:
In the cscart_companies table in the database (storefront and secure_storefront columns)
On the Administration -> Stores page (Storefront URL and Secure storefront URL fields)
At the end, do not forget to clear cache. You can do it by adding the "?cc&ctpl" to the URL in the admin panel. E.g.
http://your_domain.com/your_admin.php?cc&ctpl
I am currently working on a magento site that is in 2 languages (French and Dutch). The approach I am taking is as follows:
Create a folder in the web root (named nl)
Import the index.php and .htaccess file to that folder
In the index.php I modify the following line:
Mage::run('nl'); // to specify the store view i want to load
When I check, the categories, CMS content etc are still in the default language. The following code:
Mage::app()->getStore()->getName();
returns the fr store's name.
What is it that I'm doing wrong? I think a viable solution would be to set the store to run in index.php...
Could someone please let me know how to load a store by ID?
After hours of huffing and puffing i was able to figure out a way to set the store id programatically :)
In the index.php file, (in your language specific folder), add the following:-
$store_id = 'your_store_id_here';
$mageRunCode = 'store view code';
$mageRunType = 'store';
Mage::app()->setCurrentStore($store_id);
Mage::run($mageRunCode, $mageRunType);
Hope someone will find this information useful :)
You will get all store details here
<?php
$allStores = Mage::app()->getStores();
foreach ($allStores as $_eachStoreId => $val)
{
$_storeCode = Mage::app()->getStore($_eachStoreId)->getCode();
$_storeName = Mage::app()->getStore($_eachStoreId)->getName();
$_storeId = Mage::app()->getStore($_eachStoreId)->getId();
echo $_storeId;
echo $_storeCode;
echo $_storeName;
}
?>
To redirect to the specified store, you need to redirect the page along with the store code.
http://www.mywebsite.com/index.php/store_code/
Please check the template/page/switch/stores.phtml for more details
If the reason you're doing the htaccess stuff is so that you can generate URLs specific to each store, you may want to go with the configuration option that does that for you, should be in System > Config > Web
I have some problem in codeigniter url segment problem in server..
In local server my web url is http:localhost/test/index.php/user/userGetData/3..if we want to get the 3 from url in controller function .
then we use $this->uri->?segment(3); it works.
But when uploaded on server we use url rewriting
$routes['getData'] = 'user/userGetData/$1'; and refresh the page after this change, server url look like http://www.test.com/getData/3
in controller function userGetData() $this->uri->segment(3); doesn't work.
How to fix this problem and same case in all function?
Are you sure $this->uri->?segment(3) it's work?
First, you need to change $config['base_url']
Use $this->uri->segment(2) to get data.
i notice that when i run a zend framework app from a server, there are alot of side effects. main issue is where i use urls like
/auth/login
i need to use
$this->baseUrl('/auth/login');
thats simple to fix. but when i use
$request->getRequestUri()
for use in redirects. eg after login, i want to redirect the user back to the prev page, it goes to the wrong place. eg. my app root is "http://localhost/app1", $request->getRequestUri() will give /app1. when i try to redirect back, it will goto http://localhost/app1/app1. btw, i am using Zend Server + IIS7 and my app is configured to run from the url stated above. maybe i shld be going to "/" instead. how can i resolve this?
update
this is in my Zend_Form class
// (Zend_Form) Login.php init()
$req = Zend_Controller_Front::getInstance()->getRequest();
$returnUrl = $req->getParam('returnUrl', $req->getRequestUri());
$this->addElement('hidden', 'returnUrl', array(
'value' => $returnUrl
));
// AuthController after login
$returnUrl = urldecode($form->getElement('returnUrl')->getValue());
if (!empty($returnUrl)) {
$this->_helper->getHelper('Redirector')->setGotoUrl($returnUrl);
}
Based on you update:
Its the prependBase-Option in the Redirector what you are looking for:
prependBase: boolean flag indicating whether or not to prepend the base URL when a relative URL is provided
So your fix is:
$this->_helper->getHelper('Redirector')->setGotoUrl($returnUrl, array('prependBase' => false));
If you are using Zend_Application you can use this in your application.ini, and wont need to specify anything else.
resources.frontController.baseUrl = "/your/public/path/"
I have solved this problem with help of Apache configs. In file \usr\local\apache\conf\vhosts.conf find a block with your site and change ways and public folder.
I am having a bit of a problem. I am duplicating my website to a test environment on a new server with a new domain.
I have it working fine with the database etc but here is my error.
On the live site if I click suppliers it goes to the page fine If I click it on the test environment it does not work.
These are two links
http://wvtest.co.uk/
http://theweddingvine.com/
The code to create the link is as follows:
<?php
echo anchor('search', 'Suppliers');
?>
The file and the folders are the same. Is there something in codeigniter which can direct the link ?
Modify application/config/config.php and set:
$config['base_url'] = "http://{$_SERVER['HTTP_HOST']}/";
That will make your links work on either server.
have you specified the correct base_path for your testing server in application/config/config.php file?
Check that please, this is the case mostly in such problems.
You could change your base_url to
$config['base_url'] = 'http://wvtest.co.uk/';
or
$config['base_url'] = '/';