Info Pages - Pretty URLs
- zipurman
- Builder
- Posts: 540
- Joined: Tue Oct 13, 2020 5:20 pm
- Phoenix Version: v
- Has thanked: 93 times
- Been thanked: 162 times
Info Pages - Pretty URLs
This hook allows you to use /catalog/pagename/ instead of /catalog/info.php?pages_id=x
https://phoenixaddons.com/knowledgebase ... etty-urls/
https://phoenixaddons.com/knowledgebase ... etty-urls/
zipurman
-----------
-----------
Tags:
-
radhavallabh
- Senior Contributor
- Posts: 466
- Joined: Tue Oct 27, 2020 4:09 am
- Phoenix Version: 1.1.0.6
- Has thanked: 29 times
- Been thanked: 3 times
- zipurman
- Builder
- Posts: 540
- Joined: Tue Oct 13, 2020 5:20 pm
- Phoenix Version: v
- Has thanked: 93 times
- Been thanked: 162 times
Re: Info Pages - Pretty URLs
For that, you'd want to use https://forums.oscommerce.com/topic/496 ... nt-1818559
zipurman
-----------
-----------
-
LeeFoster
- Contributor
- Posts: 263
- Joined: Sun Feb 28, 2021 9:41 pm
- Phoenix Version: v1.0.8.20
- Has thanked: 1 time
- Been thanked: 5 times
Re: Info Pages - Pretty URLs
I've just installed this on a local xampp install and it's not working, what am I missing?
I have dropped all the files in and edited the .htaccess file.
I have dropped all the files in and edited the .htaccess file.
- zipurman
- Builder
- Posts: 540
- Joined: Tue Oct 13, 2020 5:20 pm
- Phoenix Version: v
- Has thanked: 93 times
- Been thanked: 162 times
Re: Info Pages - Pretty URLs
I need more info.
What page/slug are you trying to link to?
Are you trying to go to yourdomain.com/slug/ ?
What do you get as a result?
Did you watch the youtube video on how use this?
zipurman
-----------
-----------
-
LeeFoster
- Contributor
- Posts: 263
- Joined: Sun Feb 28, 2021 9:41 pm
- Phoenix Version: v1.0.8.20
- Has thanked: 1 time
- Been thanked: 5 times
Re: Info Pages - Pretty URLs
The page is about us, the slug is about.
I am testing this on a local install so I am trying to go to 127.0.0.1/360v3/about
Result is 404 page not found.
Yes I did watch the video
I just found the issue, it is related to me being on a local install, /info.php?pageis=$1 needed to be 360v3/info.php?pageis=$1
I know this allows the use of /about or /shipping instead of /info.php?pages_id=4 but is there a way to get /info.php?pages_id=4 to change to /shipping when clicking an internal link?
I am testing this on a local install so I am trying to go to 127.0.0.1/360v3/about
Result is 404 page not found.
Yes I did watch the video
I just found the issue, it is related to me being on a local install, /info.php?pageis=$1 needed to be 360v3/info.php?pageis=$1
I know this allows the use of /about or /shipping instead of /info.php?pages_id=4 but is there a way to get /info.php?pages_id=4 to change to /shipping when clicking an internal link?
- zipurman
- Builder
- Posts: 540
- Joined: Tue Oct 13, 2020 5:20 pm
- Phoenix Version: v
- Has thanked: 93 times
- Been thanked: 162 times
Re: Info Pages - Pretty URLs
Not as easy as htaccess has no way of knowing what slug belongs to pages_id=4
You could add some logic to the hook that checks if pages_id is loaded in the $_GET['pages_id'] and then load the slug and do a re-direct to the /slug/ using a header location. Just have to be careful not to create a recursive loop
You could add some logic to the hook that checks if pages_id is loaded in the $_GET['pages_id'] and then load the slug and do a re-direct to the /slug/ using a header location. Just have to be careful not to create a recursive loop
zipurman
-----------
-----------
-
villameschik
- zipurman
- Builder
- Posts: 540
- Joined: Tue Oct 13, 2020 5:20 pm
- Phoenix Version: v
- Has thanked: 93 times
- Been thanked: 162 times
Re: Info Pages - Pretty URLs
This does work for the 1.0.8.0 version now.?¿villameschik wrote: ↑Fri Mar 26, 2021 8:33 am Hi zipurman, could this also work on the 1080 version?
zipurman
-----------
-----------
-
LeeFoster
- Contributor
- Posts: 263
- Joined: Sun Feb 28, 2021 9:41 pm
- Phoenix Version: v1.0.8.20
- Has thanked: 1 time
- Been thanked: 5 times
Re: Info Pages - Pretty URLs
Shame as this would be more useful I suspect.
Or change the way this link is written so the link is /shipping instead of /info.php?pages_id=4