Current time: 02-07-2012, 11:21 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ACP] SEO Urls
11-14-2008, 10:16 AM
Post: #1
[ACP] SEO Urls
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 Tongue

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
Visit this user's website Find all posts by this user
Quote this message in a reply
11-14-2008, 06:59 PM
Post: #2
RE: [ACP] SEO Urls
Thats nice Jimmie, congrats on making the first app Wink

Jonny H - THT Main Developer & Founder
Find all posts by this user
Quote this message in a reply
11-15-2008, 03:35 PM
Post: #3
RE: [ACP] SEO Urls
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
Visit this user's website Find all posts by this user
Quote this message in a reply
06-21-2009, 12:27 PM
Post: #4
RE: [ACP] SEO Urls
Out of curiosity, is this plugin every coming around? Smile I realize its been a very long while since this has ever been updated.
Find all posts by this user
Quote this message in a reply
06-21-2009, 02:11 PM
Post: #5
RE: [ACP] SEO Urls
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]

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)