Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

SEO URLs for PHPFusion | Alpha Testing

Asked Modified Viewed 24,206 times
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
  • Started this discussions
asked
Veteran Member

Hello Guyz,

I have Coded an Infusion which will provide you the ability to make your website URLs SEO Friendly. I hope that you will like it.

I tested it thoroughly but I think that people would test it more better.

Infusion Algorithm:

This infusion is based on REGEX/Regular Expression search.

1. Search for :
http://mysite.com/news.php?readmore={some number}

2. Replace it with :
http://mysite.com/News-{some number}-News-Description

3. Similarly do this for other URLs of Core.

Working:

As you know, it is quite impossible to implement it for all kind of URLs in the system, on basis of using Regex, you may find some little areas to be normal as they are in the system.

But I've tried my best to make each and every possible URL to be user friendly.

Testing and Reporting:

Currently, its Live Demo and Testing is done at : http://fusion8.co.cc/

Please Test it by Downloading and Installing it from below and kindly Report any "Errors" from the Error Log.

Installation:

1. Download and install seo_friendly_urls_panel and Infuse it.

2. Add the Panel seo_friendly_urls_panel to Panels and Display it on all pages if you are adding it as Upper/Lower Panel.

3. A Small Change in maincore.php :

Find :
define("TRUE_PHP_SELF", $current_page);

Replace with :
Use this Code if you have Choose SEO URLs Type as Plain : http://yoursite.com/news
if (preg_match("/\/(administration)\//", $current_page))
{
   define("TRUE_PHP_SELF", $current_page);
}
else if (preg_match("/".preg_replace("/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $settings['opening_page'])."/", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $current_page)))
{
   define("TRUE_PHP_SELF", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "/$1", $current_page));
}
else
{
   define("TRUE_PHP_SELF", $current_page);
}


Use this Code if you have Choose SEO URLs Type as HTML : http://yoursite.com/news.html
if (preg_match("/\/(administration)\//", $current_page))
{
   define("TRUE_PHP_SELF", $current_page);
}
else if (preg_match("/".preg_replace("/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $settings['opening_page'])."/", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $current_page)))
{
   define("TRUE_PHP_SELF", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "/$1.html", $current_page));
}
else
{
   define("TRUE_PHP_SELF", $current_page);
}


Done !!!

EDIT : Sorry I forgot to include the code from HTACCESS

Also, You must paste the code in your .htaccess file.

.htaccess File attached now !
Edited by Ankur on 18-07-2012 18:30,
Ankur attached the following file:
seo_friendly_urls_panel.zip [No information available / 765 Downloads]
htaccess.zip [No information available / 756 Downloads]
0 replies

25 posts

K
KasteR
K
KasteR 10
  • Senior Member, joined since
  • Contributed 290 posts on the community forums.
  • Started 1 thread in the forums
answered
Senior Member

Ankur,
Just to provide you more resources, if you're available for Adrijan's request. Here's where he originally outlines his issue in detail:
http://www.php-fusion.co.uk/forum/viewthread.php?thread_id=32250&pid=180295#post_180212
0 replies

Category Forum

Addons Open Testing

Labels

None yet

Statistics

  • Views 0 views
  • Posts 25 posts
  • Votes 0 votes
  • Topic users 9 members

9 participants

H
H
Hal Ricard
  • Member, joined since
  • Contributed 95 posts on the community forums.
  • Started 12 threads in the forums
J
J
jikaka 10
www.rusfusion.ru - russian nss
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 82 threads in the forums
Y
Y
Yodix 10
Happy Hunger Games! And may the odds be ever in your favor.
  • Member, joined since
  • Contributed 62 posts on the community forums.
  • Started 20 threads in the forums
S
S
spunk 10
www.duesseltag.de/../../images/banner/banner209x69.png
  • Member, joined since
  • Contributed 92 posts on the community forums.
  • Started 6 threads in the forums
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
  • Started this discussions
R
R
Rush_ 10
  • Junior Member, joined since
  • Contributed 34 posts on the community forums.
  • Started 3 threads in the forums
S
S
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 8 threads in the forums
K
K
KasteR 10
  • Senior Member, joined since
  • Contributed 290 posts on the community forums.
  • Started 1 thread in the forums
A
A
  • Junior Member, joined since
  • Contributed 25 posts on the community forums.
  • Started 3 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet