Zen Cart Logo
Forums / General Questions / ez-pages problem - forward overide not working

ez-pages problem - forward overide not working

Locked

Views: 1,608

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
14 Jul 2007, 9:30 PM
#1
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

ez-pages problem - forward overide not working

I have an ezpage that I want to forward to another internal ezpage, I have tried both putting:

index.php?main_page=page&id=99&chapter=12

in the INTERNAL link URL

AND ALSO:

http://www.meditationstore.net/index.php?main_page=page&id=99&chapter=12

In the EXTERNAL link URL

The TextArea is completely blank, the page has only a title. The reason i do not wnt to just delete it is because i have backlinks to the page from other websites... why is it not working?

15 Jul 2007, 9:31 PM
#2
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

Re: ez-pages problem - forward overide not working

well i guess i will move this over to the bug reports forum...

MODERATOR NOTE: other post has been merged with this one.

15 Jul 2007, 9:48 PM
#3
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

Re: ez-pages problem - forward overide not working

at the bottom of each of the ezpages there is a section which allows me to enter an internal or external url to forward the person to if they click on a link which (is perhaps old) brings them to THAT ezpage. I have such a situation where I had to move the contents of one ezpage to a new one, but want to preserve the backlinks I have to the original ezpage.

The problem I am having is that I have tried putting both the external url to the new page and the internal url to it in their respective boxes under the html area and it is having absolutely no effect.

The old url, the one i am trying to forward, is:

http://www.meditationstore.net/index.php?main_page=page&id=7

  • There is no text in the htmlArea, it won't let me have any in there, it tells me that I have to have either a forwarding url OR content in the htmlArea and won't let me proceed unless I erase one.The instructions state:

If specified, the page content will be ignored and this INTERNAL alternate URL will be used to make the link
Example to Reviews: index.php?main_page=reviews

The url I used is standard, i tried the following(in the internal url box with nothing in the htmlArea or the external url boxes):

> index.php?main_page=page&id=99&chapter=12

AND ALSO:

> /index.php?main_page=page&id=99&chapter=12

The urls I tried in the EXTERNAL alternate url box are:

http://www.meditationstore.net/index.php?main_page=page&id=99&chapter=12

AND ALSO:

www.meditationstore.net/index.php?main_page=page&id=99&chapter=12

AND ALSO:

meditationstore.net/index.php?main_page=page&id=99&chapter=12

AND ALSO:> http://www.zencart.com

Thanks in advance

16 Jul 2007, 10:18 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ez-pages problem - forward overide not working

humbll:

I have an ezpage that I want to forward to another internal ezpage, I have tried both putting:

index.php?main_page=page&id=99&chapter=12

in the INTERNAL link URLUsing this approach will work great ... for clickable links on your site.

But to redirect pages coming in from search engines will require some other approach. You have two options:

a. Use a .htaccess directive to redirect the page. This is probably simplest to understand.

b. Write custom code in the ezpages header_php.php script to detect the "old" page number, send a 301 redirect header, and then redirect to the new page number.

17 Jul 2007, 4:10 AM
#5
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

Re: ez-pages problem - forward overide not working

DrByte:

Using this approach will work great ... for clickable links on your site.
That was the point, Doc, it is NOT working. At all.

But to redirect pages coming in from search engines will require some other approach. You have two options:

a. Use a .htaccess directive to redirect the page. This is probably simplest to understand.

b. Write custom code in the ezpages header_php.php script to detect the "old" page number, send a 301 redirect header, and then redirect to the new page number.

I tried using the standard overrides in the htaccess in the root of my site, but it did not work either. What code do i add to the header_php.php to make it detect, and what is the code to put in there to make it reirect? I wonder why the problem is happening with .htaccess and ezpage overrides to start with? any ideas about that at all?

17 Jul 2007, 4:35 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ez-pages problem - forward overide not working

I'm not the one to give you the regex expressions to use in your redirect directives in an .htaccess file -- I'd only point you to other online references after googling for them.

In terms of building one in the ezpages header_php.php script, I'd just write an if statement checking for the id of the page you want to redirect from, then send a 301-redirect header from PHP, and then send it to the new page url. It's just a hack, and would need to be redone during site upgrades etc, but it'd work.

Something like this:

find:if ($ezpage_id == 0) zen_redirect(zen_href_link(FILENAME_DEFAULT));add this after it:```
if ($ezpage_id == 7) {
header("HTTP/1.1 302 Moved Permanently");
zen_redirect(zen_href_link(FILENAME_EZPAGES, 'id=99&chapter=12'));
}

17 Jul 2007, 5:53 AM
#7
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

Re: ez-pages problem - forward overide not working

Great, thanks Doc. Now if only I could locate the file you are referencing, I used the developers tool kit to search for it, and also browsed through the files in /includes/modules/pages/ and many other locations, and i am unable to locate a header_php.php associated with ezpages. There seems to be one in every other /pages file... can you give me a clue as to the right direction to look? Thanks again for the help..

17 Jul 2007, 6:05 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ez-pages problem - forward overide not working

/includes/modules/pages/page/header_php.php

17 Jul 2007, 7:53 PM
#9
humbll avatar

humbll

Zen Follower

Join Date:
Jan 2007
Location:
USA
Posts:
219
Plugin Contributions:
0

Re: ez-pages problem - forward overide not working

sweet, thanks Doc, I will play with that and see if i can't get it going:smartalec:...