Post by alyosha » Fri Sep 11, 2009 5:34 am

Hope I'm not being a nuisance; though I ask a lot of questions, I hope they're good questions that will also help others.

So here it is:

the URL that gets generated for going "home" is usually set to

http://sitename.com/index.php?route=common/home

using

$this->url->https('common/home')

in the appropriate php file for the template... but I want it just to be

http://sitename.com

Is there an easy way to change this?

Thanks again. The more I learn, the more I can help others learn.

Newbie

Posts

Joined
Mon Sep 07, 2009 7:03 pm

Post by dbstr » Fri Sep 11, 2009 5:48 am

Just change $this->url->https('common/home') to 'http://sitename.com'

So you'll end up with something like

$this->data['home'] = 'http://sitename.com';
or
'url' => 'http://sitename.com',

Depending on where you are changing it. Remember to change the variables to whatever it's called in your files..

Request Reviews v1.0 released.


Active Member

Posts

Joined
Sun Aug 30, 2009 12:20 am

Post by alyosha » Fri Sep 11, 2009 8:10 am

of course I knew this option existed... i was hoping for a single way to change the url variable site-wide.

Newbie

Posts

Joined
Mon Sep 07, 2009 7:03 pm

Post by dbstr » Fri Sep 11, 2009 8:38 am

Right, sorry then. Dont know, a rewrite in .htaccess perhaps?

Request Reviews v1.0 released.


Active Member

Posts

Joined
Sun Aug 30, 2009 12:20 am

Post by superann » Wed Sep 23, 2009 6:31 pm

Was just looking for this and found the function in system/engine/url.php. You can just do something like:

Code: Select all

if($route == 'common/home') return HTTP_SERVER;
You can also hack in some nicer urls for the other pages.

New member

Posts

Joined
Mon Sep 07, 2009 9:59 am


Post by littleredcar » Thu Sep 24, 2009 11:58 pm

superann wrote:Was just looking for this and found the function in system/engine/url.php. You can just do something like:

Code: Select all

if($route == 'common/home') return HTTP_SERVER;
You can also hack in some nicer urls for the other pages.
hi superann.

can you please post an example of how you did this (some more code)? :)

thanks a lot!

---
Umgebung
php-Version: 7.2
MySQL-Version: 5.7.26
Browser & Version: Chrome latest

---
OpenCart Spezifisch
OC: 2.3.0.2 singlestore (bugfree edition by xxvirusxx: https://github.com/condor2/Opencart_2302)
OC: 3.0.2.0 singlestore
DE Sprachpaket von OSWorX (https://www.opencart.com/index.php?rout ... n_id=31048)


Active Member

Posts

Joined
Thu Jul 30, 2009 4:21 pm

Post by littleredcar » Mon Sep 27, 2010 6:37 pm

littleredcar wrote:
superann wrote:Was just looking for this and found the function in system/engine/url.php. You can just do something like:

Code: Select all

if($route == 'common/home') return HTTP_SERVER;
You can also hack in some nicer urls for the other pages.
hi superann.

can you please post an example of how you did this (some more code)? :)

thanks a lot!
hi there.
any news on this?

thanks!

---
Umgebung
php-Version: 7.2
MySQL-Version: 5.7.26
Browser & Version: Chrome latest

---
OpenCart Spezifisch
OC: 2.3.0.2 singlestore (bugfree edition by xxvirusxx: https://github.com/condor2/Opencart_2302)
OC: 3.0.2.0 singlestore
DE Sprachpaket von OSWorX (https://www.opencart.com/index.php?rout ... n_id=31048)


Active Member

Posts

Joined
Thu Jul 30, 2009 4:21 pm

Post by Johnathan » Mon Sep 27, 2010 8:52 pm

I mention a solution that worked for me (working with .htaccess) here.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by littleredcar » Mon Sep 27, 2010 9:05 pm

great, thanks - will have a look at this today!

C A R

---
Umgebung
php-Version: 7.2
MySQL-Version: 5.7.26
Browser & Version: Chrome latest

---
OpenCart Spezifisch
OC: 2.3.0.2 singlestore (bugfree edition by xxvirusxx: https://github.com/condor2/Opencart_2302)
OC: 3.0.2.0 singlestore
DE Sprachpaket von OSWorX (https://www.opencart.com/index.php?rout ... n_id=31048)


Active Member

Posts

Joined
Thu Jul 30, 2009 4:21 pm
Who is online

Users browsing this forum: No registered users and 21 guests