Info Pages - Pretty URLs
-
- VIP Member
- Posts: 228
- Joined: Sun Feb 28, 2021 9:41 pm
- Has thanked: 1 time
- Been thanked: 5 times
Re: Info Pages - Pretty URLs
@zipurman my next step is to add the folder into the url so it would read /information/about/
Any thoughts on this?
Any thoughts on this?
Tags:
- villameschik
- Posts: 58
- Joined: Mon Jan 11, 2021 3:09 pm
- Has thanked: 9 times
- Been thanked: 2 times
Re: Info Pages - Pretty URLs
yes the latest version 1.0.8.0, does it work?zipurman wrote: ↑Fri Mar 26, 2021 8:36 amThis 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
- PhoenixCart Developer
- Posts: 470
- Joined: Tue Oct 13, 2020 5:20 pm
- : Buy Me A Beverage
- Has thanked: 84 times
- Been thanked: 147 times
Re: Info Pages - Pretty URLs
You could edit the .htaccess to include the /:
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9\/]+) /info.php?pageis=$1 [L]
</IfModule>
Code: Select all
<?php
class hook_shop_system_infopages {
function listen_startApplication() {
if ( ! empty( $_GET ) && ! empty( $_GET["pageis"] ) ) {
$slug = $_GET["pageis"];
$slug = preg_replace( '/[^a-zA-Z0-9\/]/', '', trim( $slug ) );
$page = tep_db_fetch_array( tep_db_query( "select * from pages where slug = '" . $slug . "'" ) );
if ( ! empty( $page ) ) {
$_GET['pages_id'] = $page['pages_id'];
} else {
tep_redirect( tep_href_link( 'index.php' ) );
}
}
}
}
zipurman
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
- zipurman
- PhoenixCart Developer
- Posts: 470
- Joined: Tue Oct 13, 2020 5:20 pm
- : Buy Me A Beverage
- Has thanked: 84 times
- Been thanked: 147 times
Re: Info Pages - Pretty URLs
All of my addons support 1.0.8.0 and I keep them up to date.
zipurman
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
- villameschik
- Posts: 58
- Joined: Mon Jan 11, 2021 3:09 pm
- Has thanked: 9 times
- Been thanked: 2 times
Re: Info Pages - Pretty URLs
hi @zipurman
I installed on a clean version 1.0.8.0 TEST, I followed the instructions etc etc, it gives me an error Not Found, as soon as I modify /catalog .htaccess it takes me back to the home page of the main site.
I installed on a clean version 1.0.8.0 TEST, I followed the instructions etc etc, it gives me an error Not Found, as soon as I modify /catalog .htaccess it takes me back to the home page of the main site.
- zipurman
- PhoenixCart Developer
- Posts: 470
- Joined: Tue Oct 13, 2020 5:20 pm
- : Buy Me A Beverage
- Has thanked: 84 times
- Been thanked: 147 times
Re: Info Pages - Pretty URLs
I know it works on 1.0.8.0 for sure as it has nothing really to do with Phoenix ... it all happens at the top of the stack. The demo video was also done in 1.0.8.0.
If your store is running in a subfolder like catalog, then you would need to change the htaccess line:
to
You can do some more reading on htaccess and RewriteRules on the web as there are so many things you can do with it.
If your store is running in a subfolder like catalog, then you would need to change the htaccess line:
Code: Select all
RewriteRule ^([A-Za-z0-9\/]+) /info.php?pageis=$1 [L]
Code: Select all
RewriteRule ^([A-Za-z0-9\/]+) /catalog/info.php?pageis=$1 [L]
zipurman
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
aka Preston Lord
-----------
Happy to help where I can
https://phoenixaddons.com
https://www.youtube.com/zipurman/ ** PHOENIX HOW-TO VIDEOS **
- villameschik
- Posts: 58
- Joined: Mon Jan 11, 2021 3:09 pm
- Has thanked: 9 times
- Been thanked: 2 times
-
- Site Admin
- Posts: 139
- Joined: Wed Oct 30, 2019 1:34 pm
- Has thanked: 20 times
- Been thanked: 21 times
Re: Info Pages - Pretty URLs
Support for this Addon will now be available on the Addon page - app.php/addons/free_addon/info_pages_pr ... ls/support