Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 10-20-2017 12:53:15

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Namespace & seourl

HI Nick

I have a namespace that points to a function and displays an include. No problem.
Seourl is set as /myurl/{ID} and info is added to the seourl and pulled using core_cgi.ref in the function. No Problem.

What if I want to use the namespace without any ref info added to it.

mydomain.com/myurl/ will work but I have to include the last trailing slash.

Can I get mydomain.com/myurl to work???

I was hoping I could define a few defaults if core_cgi,ref was empty in the function, and then display the include, but I just get a 404 error.

I've got one workaround, but I'm not sure if it is the seo friendly, and seems a little unneccessary:
If I create a webpage as mydomain.com/myurl first and then the namespace, it bypasses K9's check for duplicate seo url's and everything works as I want. I can then include the default values in the webpage version, and use the namespace version when any info is passed with the url.


Rob

Offline

 

#2 10-23-2017 08:03:18

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19861
Website

Re: Namespace & seourl

The system is expecting an id as input, requiring a trailing slash.  One thing you can do is print the link without a trailing slash in your code, then add it in .htaccess with a silent rewrite so the software pics it up the right way.  What I usually do is use a base for the namespace without parameters as in '/myurl', then for the more specific URLs, I use something else like '/myurldetails/{ID}'.


Nick Hendler

Offline

 

Board footer