@zipurman my next step is to add the folder into the url so it would read /information/about/
Any thoughts on this?
Info Pages - Pretty URLs
-
villameschik
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
- 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
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
-----------
-----------
- 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
All of my addons support 1.0.8.0 and I keep them up to date.
zipurman
-----------
-----------
-
villameschik
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
- 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 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
-----------
-----------
-
admin
- Contributor
- Posts: 217
- Joined: Wed Oct 30, 2019 1:34 pm
- Phoenix Version:
- Has thanked: 20 times
- Been thanked: 22 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