Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 202
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 121
Total: 122

Author Topic: Pretty URL's Pro rewriting URLs  (Read 2494 times)

0 Members and 2 Guests are viewing this topic.

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Pretty URL's Pro rewriting URLs
« on: December 30, 2022, 01:05:09 pm »
Would you be able to tell me how to rewrite URL's like this:

Quote
index.php?page=page3457

Into a friendlier version?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #1 on: December 30, 2022, 09:57:46 pm »
It depends on the level of cusotmization changing to /pages/133 is easier than page/title/

https://www.smfhacks.com/index.php/topic,9675.0.html the prettyurls extras is a good start for a coding example has a couple other mods in there.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/
Like Like x 1 View List

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #2 on: December 31, 2022, 10:41:51 am »
For safey reasons, I installed the extra mod on my test site and emulated 2.0. It added.
Code: [Select]
# PRETTYURLS MOD ENDS
RewriteRule ^([a-zA-Z0-9-]+)$ index.php?page=page3457=$1
RewriteRule ^([a-zA-Z0-9-]+)/$ index.php?page=page3457=$1

But I see no changes, I have cleared my browser cache, my forums, used the maintain tool within the Pretty URL mod. Any ideas why it might not be doing anything?


I just realised there's a different option for a portal: Tiny Portal which does work.

That makes the url look like: page/page3457/

How would I alter it so that it dropped the first page and gave it a proper title?
« Last Edit: December 31, 2022, 10:55:31 am by [chrisB] »

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #3 on: January 01, 2023, 11:10:35 am »
I'll speak with TinyPortal.

I apologise if you have been annoyed or considered my posts to be spam. I'm not exactly sure why my home IP as been banned but I won't post on here after this.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #4 on: January 01, 2023, 12:51:59 pm »
No you haven't had time to look at it.
Home IP banned was from someone else. I ban spammers by ip.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/
Informative Informative x 1 View List

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #5 on: January 28, 2023, 04:50:20 am »
I recently tagged you in a post on SMF regarding an issue with my site.

I have posted on another site asking for help, as returning members would tell me they can't access it due to only text showing.

Could editing the 'QueryString.php' file to remove the /index.php cause a conflict with the Pretty URLs Pro mod? This is a reply I got from my support post - https://www.smfhelper.com/index.php?msg=10224

I have tried to replicate this issue in two live environments, but I never made the edit previously mentioned as I didn't think at the time this could be the root of issue. Thing is, I have uninstalled every mod and the same behaviour happens, so it's all weird.


It's caused by an edit I did.

It depends on the level of cusotmization changing to /pages/133 is easier than page/title/

https://www.smfhacks.com/index.php/topic,9675.0.html the prettyurls extras is a good start for a coding example has a couple other mods in there.

/page/title/ is already included.

https://poetryartonline.com/page/articles/

When you next get chance, could you look into removing /page/ from the URLs please.
« Last Edit: January 31, 2023, 09:02:15 am by [chrisB] »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #6 on: January 31, 2023, 02:03:32 pm »
Removing the pages part would be harder require extra database queries as
/a-z/a-z/  is already part of pretty urls for the forum side of category/topic
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #7 on: February 01, 2023, 03:56:16 pm »
Removing the pages part would be harder require extra database queries as
/a-z/a-z/  is already part of pretty urls for the forum side of category/topic
Rodger, when things free up for you - I'll talk to you about it if that's okay.

Can you remind me what goes in these please?


When you tidied up the issues I had before due to the other reactions mod and the installer not working correctly, you added to the skip actions list - I lost it when I installed the last version.

I'll remind myself to make a note :)

My test site redirects to friendly URLs

Whereas my live site '/index.php?action=forum'

That's due to Pretty URLs root not being set right? I've tried sorting this but nothing I have tried corrects it.
« Last Edit: February 01, 2023, 04:06:47 pm by [chrisB] »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #8 on: February 01, 2023, 04:14:31 pm »
Skip actions is an action=gallery  that you don't want to rewrite.   So you put "gallery" in that list.
Pretty urls root. No need for anything but is your full web site address https:// etc without a / on the end.
This is mainly used if you change your domain.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #9 on: February 01, 2023, 05:03:22 pm »
🤦🏻‍♂️ I've broken the logout/login part somehow.

https://poetryartonline.com/index.php?action=forum

I've added my URL to the pretty urls root, used the maintenance tool to update the URLs and cleared my cache (browser and site).

God knows what I've done.

-Edit-

It's the logout part that breaks.

If I sign in via /forum/ it redirects fine.
« Last Edit: February 01, 2023, 05:06:27 pm by [chrisB] »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #10 on: February 01, 2023, 05:09:59 pm »
Add logout to the skip actions list
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Pretty URL's Pro rewriting URLs
« Reply #11 on: February 01, 2023, 05:18:47 pm »
It still logs out breaking the pretty urls;

index.php?action=forum instead of /forum/

This is my htaccess file.
Code: [Select]
# PRETTYURLS MOD BEGINS
# Pretty URLs SEO Pro mod
# https://www.smfhacks.com/prettyurls-seo-pro.php
# .htaccess file generated automatically on: February 1, 2023, 22:58

RewriteEngine on
RewriteBase /

# Rules for: tp-articles
RewriteRule ^page/([^/]+)/?$ ./index.php?pretty;page=$1 [L,QSA]

# Rules for: profiles
RewriteRule ^profile/([^/]+)/?$ ./index.php?pretty;action=profile;user=$1 [L,QSA]

# Rules for: actions
RewriteRule ^(agreement|acceptagreement|activate|admin|announce|attachapprove|buddy|calendar)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(clock|coppa|credits|deletemsg|dlattach|editpoll|editpoll2|findmember)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(groups|help|helpadmin|jsmodify|jsoption|likes|lock|lockvoting)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(login|login2|logintfa|logout|markasread|mergetopics|mlist|moderate)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(modifycat|movetopic|movetopic2|notifyannouncements|notifyboard|notifytopic|pm|post)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(post2|printpage|profile|quotefast|quickmod|quickmod2|recent|reminder)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(removepoll|removetopic2|reporttm|requestmembers|restoretopic|search|search2|sendactivation)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(signup|signup2|sitemaps|prettyurls|smstats|suggest|splittopics|stats)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(sticky|theme|trackip|about:unknown|unread|unreadreplies|uploadAttach|verificationcode)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(viewprofile|vote|viewquery|viewsmfile|who|\.xml|xmlhttp|forum)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(tpadmin|forum|tportal|tpshout|awesome|team)/?$ ./index.php?pretty;action=$1 [L,QSA]

# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD ENDS

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php80” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php80 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php8_module>
   php_flag display_errors Off
   php_flag zlib.output_compression Off
   php_value max_execution_time 90
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 512M
   php_value post_max_size 256M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
   php_value upload_max_filesize 60M
</IfModule>
# END cPanel-generated php ini directives, do not edit

-Edit- It's happening on my fresh installed test site, but only once Tiny Portal was installed.
« Last Edit: February 01, 2023, 05:35:39 pm by [chrisB] »

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
6073 Views
Last post December 13, 2010, 07:05:12 pm
by SMFHacks
12 Replies
8931 Views
Last post April 07, 2012, 08:25:21 am
by SMFHacks
6 Replies
7366 Views
Last post July 15, 2018, 04:14:19 pm
by SMFHacks
14 Replies
9054 Views
Last post November 08, 2023, 05:23:14 pm
by SMFHacks
7 Replies
4237 Views
Last post March 07, 2019, 11:23:09 pm
by SMFHacks

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal