Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4206
Latest: jagwire
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 42718
Total Topics: 7443
Most Online Today: 60
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 42
Total: 42

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

0 Members and 1 Guest are viewing this topic.

Offline [chrisB]

  • Pretty Urls SEO Pro
  • 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: 16204
    • 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]

  • Pretty Urls SEO Pro
  • 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]

  • Pretty Urls SEO Pro
  • 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: 16204
    • 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]

  • Pretty Urls SEO Pro
  • 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: 16204
    • 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]

  • Pretty Urls SEO Pro
  • 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: 16204
    • 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]

  • Pretty Urls SEO Pro
  • 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: 16204
    • 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]

  • Pretty Urls SEO Pro
  • 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
12 Replies
7519 Views
Last post April 07, 2012, 08:25:21 am
by SMFHacks
6 Replies
6617 Views
Last post July 15, 2018, 04:14:19 pm
by SMFHacks
12 Replies
5849 Views
Last post January 16, 2023, 04:00:57 pm
by SMFHacks
7 Replies
2969 Views
Last post March 07, 2019, 11:23:09 pm
by SMFHacks
16 Replies
857 Views
Last post December 27, 2022, 05:32:14 pm
by [chrisB]

+- Recent Topics

Feature to upload a photo straight when composing a message by SMFHacks
February 04, 2023, 08:13:46 am

Pretty URL's Pro rewriting URLs by [chrisB]
February 01, 2023, 05:18:47 pm

Question before purchase by SMFHacks
February 01, 2023, 03:53:33 pm

Unlimited ending time by Saftek
January 29, 2023, 10:06:26 pm

Converting from Aeva Media by ivanr
January 28, 2023, 10:09:42 am

[Mod] Post Scheduler by bayonetbrant
January 23, 2023, 02:24:09 pm

"Notify all store admins of item purchase" Not Working in SMF 2.1.2 or 2.1.3 by Michael Vail
January 22, 2023, 10:50:23 pm

[Request] Future consideration by [chrisB]
January 18, 2023, 08:42:53 am

Pretty Urls extras by SMFHacks
January 16, 2023, 04:00:57 pm

I don't think its installed correctly by SMFHacks
January 10, 2023, 05:56:21 pm

Powered by EzPortal