Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Disable your ad blocker to continue using our website.
Info Pages Pretty URLs
If the slug includes dash or underscore - Info Pages Pretty URLs
by yeno » Thu Jul 28, 2022 1:03 am
Info Pages Pretty URLs ver. 1.0.0 allows to use only one-word slug.
Sometimes might be useful to use something like
example.com/info-page-name
or
example.com/info_page_name
1) /.htaccess
Find
Code: Select all
RewriteRule ^([A-Za-z0-9\/]+) /info.php?pageis=$1 [L]
Replace with
Code: Select all
RewriteRule ^([a-zA-Z0-9\/\-_]+) /info.php?pageis=$1 [L]
2) /includes/hooks/shop/system/infopages.php
Find
Code: Select all
$slug = preg_replace( '/[^a-zA-Z0-9\/]/', '', trim( $slug ) );
Replace with
Code: Select all
$slug = preg_replace( '/[^a-zA-Z0-9\/\-_]/', '', trim( $slug ) );
-
yeno
- Posts: 5
- Joined: Sat Dec 12, 2020 1:48 pm
-
Contact:
by zipurman » Thu Jul 28, 2022 3:52 am
For sure! This was only meant to show what is possible and how to do it. Adapt to suit your needs
-
zipurman
- PhoenixCart Developer
- Posts: 470
- Joined: Tue Oct 13, 2020 5:20 pm
- : Buy Me A Beverage
-
Contact: