Page 1 of 1

replacing part of the URL

Posted: 03 May 2016, 12:40
by MS-POWER
Dear

what is the best or easy way to replace second level of the URL only

example :

http:// www.photo.gallery/ forum / viewforum.php?f=52

to

http:// www.photo.gallery/ new /viewforum.php?f=52

I need at any location in the site whenever I click button it will replace only first directory and keep others all same for the new link


regards

Re: replacing part of the URL

Posted: 03 May 2016, 13:03
by mjau-mjau
What you ask can't really be done unfortunately ...

First of all, the URL structure is a virtual representation of your content structure. It is required by X3 to be able to ROUTE requests by url to locate the correct physical page.

Example
mywebsite.com/page/subpage/

This instructs X3 to look for a folder /content/*.page/*.subpage/, where it will also find the necessary /content/*.page/*.subpage/page.json data file, and of course all the images. Without a ROUTE in the url that can be translated to a physical page request, X3 will not know where to look for the data that ultimately creates the page.

If you clip away a segment of the URL, how will X3 be able to ROUTE the request?

Re: replacing part of the URL

Posted: 03 May 2016, 14:56
by MS-POWER
thanks dear