Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ACP] SEO Urls
#1
Since THT's Client Area/Admin Panel is mainly based on Query Strings to show pages, I wanted to make it more SEO Friendly. Even that the ACP does not need it (No search indexes there, its not even needed) I made it, as the first ever plugin :p

File Structure:
/admin/.htaccess (New File)
/admin/pages/*.php (Changes)

SQL Changes: Yes

This transforms the pages into more friendly-urls, like:

Instead of: ?page=server
Changed to: server.html
Instead of: ?page=server&sub=add
Changed to: server.html&sub=add*

*May be changed to server-add.html

Keep looking at this thread to look at updates Wink
Jimmie Lin - Community Manager & THT.Next Developer
Reply
#2
Thats nice Jimmie, congrats on making the first app Wink
Jonny H - THT Main Developer & Founder


Reply
#3
Source Code:
Code:
###########################
#THT SEO URLs
#Plugin by Jimmie32, THT Team
###########################
RewriteEngine On #Starts RewriteEngine
    RewriteRule ^([a-z]+).php index.php?page=$1 [L,QSA] #Case 1, index.php?page=n
    RewriteRule ^([a-z]+).php ?page=$1 [L,QSA] #Case 2, ?page=n
RewriteRule ^([^.]+)/?$ $1.php?%{QUERY_STRING} [L] #Now convert to dirs

To use, upload to /admin/
Also, this works with two types of URLs!

index.php?page=Test will convert to:
/test/
/Test.html

Smile
Jimmie Lin - Community Manager & THT.Next Developer
Reply
#4
Out of curiosity, is this plugin every coming around? Smile I realize its been a very long while since this has ever been updated.
Reply
#5
The plugin is finished (as seen by Jimmies above post)

To install:

create a file called .htaccess in /admin diectory of your tht installation and copy this code to that file:

Code:
###########################
#THT SEO URLs
#Plugin by Jimmie32, THT Team
###########################
RewriteEngine On #Starts RewriteEngine
    RewriteRule ^([a-z]+).php index.php?page=$1 [L,QSA] #Case 1, index.php?page=n
    RewriteRule ^([a-z]+).php ?page=$1 [L,QSA] #Case 2, ?page=n
RewriteRule ^([^.]+)/?$ $1.php?%{QUERY_STRING} [L] #Now convert to dirs
Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)