Search…

X3 Photo Gallery Support Forums

Search…
 
MS-POWER
Experienced
Topic Author
Posts: 38
Joined: 16 Mar 2016, 14:41

replacing part of the URL

03 May 2016, 12:40

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
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: replacing part of the URL

03 May 2016, 13:03

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?
 
MS-POWER
Experienced
Topic Author
Posts: 38
Joined: 16 Mar 2016, 14:41

Re: replacing part of the URL

03 May 2016, 14:56

thanks dear