category alias

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

category alias

Post by oops »

/index.php?alias - don't work... :?
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

well you have to tell what error you get
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

gar keinen, ich bekomm einfach nur index.php
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Re: category alias

Post by DeXXus »

oops wrote:/index.php?alias - don't work... :?
Some basic questions:

1. Did you already insert a structure level under index.php and give it a category title and then alias the category as.... "alias" and send the category data ?

2. And have you inserted a link somewhere in the article content that when clicked upon does not take you there?

3. Or are you entering the link into your browser address window and getting just the index page?

4. Or have you entered a [ID string]alias[/ID] somewhere that is giving you this symptom?

It should work if you have performed the steps in question #1 :?
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Re: category alias

Post by oops »

DeXXus wrote:
oops wrote:/index.php?alias - don't work... :?
Some basic questions:

1. Did you already insert a structure level under index.php and give it a category title and then alias the category as.... "alias" and send the category data ?

2. And have you inserted a link somewhere in the article content that when clicked upon does not take you there?

3. Or are you entering the link into your browser address window and getting just the index page?

4. Or have you entered a [ID string]alias[/ID] somewhere that is giving you this symptom?

It should work if you have performed the steps in question #1 :?
very basic questions :roll:

it work on my local machine, but not work on my server :cry:
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Re: category alias

Post by DeXXus »

Believe me... with just this query:
oops wrote:/index.php?alias - don't work... :?
there will not be much help offered :wink:
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

i attempted all variants...
maybe problem with php 4.2.2 ? :?
Jens
Posts: 6
Joined: Sat 11. Oct 2003, 14:17

Post by Jens »

I've got the same problem. The reason is, that

Code: Select all

sizeof($_GET)
is nil, if "?alias" without a "=" is used. However, even if a "=" - like "?alias=" - is used, the alias-feature in content.func.inc.php does not work. By the way, I'm using PHP 4.2.1 as well as 4.2.2. So, any ideas?
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

thanks
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

It should be possible to change that. Do this. Check if $_SERVER["QUERY_STRING"] is not empty and test this code

in content.func.inc.php below line 52 try this

Code: Select all

if(sizeof($_GET)) {
		foreach($_GET as $key => $value) {
			$alias = trim($key);
			break;
		}
to

Code: Select all

if(trim($_SERVER['QUERY_STRING'])) {
		$query = explode("&", trim($_SERVER['QUERY_STRING']));
		$alias = $query[0];
Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

It works :D
ami6
Posts: 6
Joined: Wed 3. Dec 2003, 11:25

Post by ami6 »

Sorry, could not get this to work. I do have the same "alias" problem.

Oliver, could you pls. clarify which part to replace, change exactly? Maybe I am too dumb to see this...

Thanks a lot!
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

You have to replace one with the other code as described above.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply