Resources
Submit
|
Guests Online: 0
Registered Members: 3,672
Newest Member: Janilein
|
PHPfusion-mods.net is hosted at:
|
Guests online: 6 Members online: bredgaard, [elyn], Janilein, Joe Kriz
registered members: 3672 newest member: Janilein
| user today: | 1633 | | user online: | 10 | | Max. onlinerecord: | 43 | | Max. per day: | 5705 | | user yesterday: | 4296 | | user month: | 34111 | | Entire users: | 107894 |
last 24h:
|
|
|
SEO Friendly URL's for PHP-Fusion |
|
In this tutorials I want to explain how you can optimize search engine results by using SEO friendly URL's for articles, news and the photogallery. Based on the SEO mod by web-bureau.com we can easily transform the ugly readarticle.php?article_id=x URL's. With this tutorial you can implant the SEO friendly URL mod to your articles, news and photogallery. I will explain how to convert your files OR you can simply download the pre-modded files. (located in the article footer)
If you are going to install all SEO mods, you only have to do step 1 and 3 once. If you run in any problems, take a look here.
<b>Requirements:</b>
- Seoname.php - PHP-Fusion 6.01.10 or higher. (probably works on lower version too but only tested with this version and higher) - .htaccess support on your server.
SEO friendly links for Articles.php (example: http://www.underground3k.com/articles.php )
| Step 1 | | Download Seoname.php and upload that file to your includes folder. |
| Step 2 | Create a new .htaccess file OR open yours if you already got one and paste the following code in it:
## SEO friendly URL by web-bureau.com ## Provided by PHPfusion-mods.net ## Use this if Fusion is installed in your root directory RewriteBase / ## Use the following if Fusion is not installed on your root directory ## RewriteBase /<fusion_path>/ RewriteEngine On ## Articles RewriteRule ^(.*)-a([0-9]*).htm$ readarticle.php?article_id=$2 [L,NC] ## Article categories RewriteRule ^(.*)-d([0-9]*).htm$ articles.php?cat_id=$2 [L,NC] |
If your Fusion isn't in the root, replace 'RewriteBase' to 'RewriteBase /<fusion_path>/' (where <fusion_path> is the folder name).
|
| Step 3 | Open Maincore.php and find:
'?>'
Above, add the following:
// Search engine friendly URLs // http://www.web-bureau.com/php-fusion-cms-c1.htm require_once INCLUDES."seoname.php"; |
|
| Step 4 | Open articles.php (original one) and search for: (line 27)
| <a href='".FUSION_SELF."?cat_id=".$data['article_cat_id']."'>".$data['article_cat_name']."</a> |
Replace with:
| <a href='".seoname($data['article_cat_name'])."-d".$data['article_cat_id'].".htm'>".$data['article_cat_name']."</a> |
Find:
| <a href='readarticle.php?article_id=".$data['article_id']."'>".$data['article_subject']."</a> |
And replace with:
| <a href='".seoname($data['article_subject'])."-a".$data['article_id'].".htm'>".$data['article_subject']."</a> |
Save articles.php and upload it. |
End
Everything should work now, if you run in trouble, recheck the steps above. If you still have problems, see the support thread .
SEO friendly links for Photogallery.php (example: http://www.underground3k.com/photogallery.php )
| Step 1 | | Download Seoname.php and upload that file to your includes folder. |
| Step 2 | Create a new .htaccess file OR open yours if you already got one and paste the following code in it:
## SEO friendly URL by web-bureau.com ## Provided by PHPfusion-mods.net ## Use this if Fusion is installed in your root directory RewriteBase / ## Use the following if Fusion is not installed on your root directory ## RewriteBase /<fusion_path>/ RewriteEngine On ## Photogallery Albums RewriteRule ^(.*)-c([0-9]*).htm$ /photogallery.php?album_id=$2 [L,NC]
## Photogallery Photo's RewriteRule ^(.*)-r([0-9]*).htm$ /photogallery.php?photo_id=$2 [L,NC] |
If your Fusion isn't in the root, replace 'RewriteBase' to 'RewriteBase /<fusion_path>/' (where <fusion_path> is the folder name).
|
| Step 3 | Open Maincore.php and find:
'?>'
Above, add the following:
// Search engine friendly URLs // http://www.web-bureau.com/php-fusion-cms-c1.htm require_once INCLUDES."seoname.php"; |
|
| Step 4 | Open photogallery.php (original one) and search for: (around line 52)
| <a href='".FUSION_SELF."?album_id=".$data['album_id']."'> |
Replace with:
| <a href='".seoname($data['album_title'])."-c".$data['album_id'].".htm'> |
Find: (around line 53)
| <a href='".FUSION_SELF."?photo_id=$photo_id'> |
And replace with:
| <a href='".seoname($data['album_title'])."-r".$data['photo_id'].".htm'> |
Find: (around line 119) | <a href='".FUSION_SELF."?album_id=".$data['album_id']."'> | And replace with: | <a href='".seoname($data['album_title'])."-c".$data['album_id'].".htm'> | Find: (around line 126) | <a href='".FUSION_SELF."?photo_id=".$data['photo_id']."'> | And replace with: | <a href='".seoname($hold_album_title)."-r".$data['photo_id'].".htm'> | Find: (around line 162) | <a href='".FUSION_SELF."?album_id=".$data['album_id']."'> | And replace with: | <a href='".seoname($data['album_title'])."-c".$data['album_id'].".htm'> | Save photogallery.php and upload it. |
End
Everything should work now, if you run in trouble, recheck the steps above. If you still have problems, see the support thread .
SEO friendly links for News.php
First: Download the new news.php .
| Step 1 | | Download Seoname.php and upload that file to your includes folder. |
| Step 2 | Create a new .htaccess file OR open yours if you already got one and paste the following code in it:
## SEO friendly URL by web-bureau.com ## Provided by PHPfusion-mods.net ## Use this if Fusion is installed in your root directory RewriteBase / ## Use the following if Fusion is not installed on your root directory ## RewriteBase /<fusion_path>/ RewriteEngine On ## News categories RewriteRule ^(.*)-nc([0-9]*).htm$ news_cats.php?cat_id=$2 [L,NC]
## News articles RewriteRule ^(.*)-rn([0-9]*).htm$ news.php?readmore=$2 [L,NC] RewriteRule ^(.*)-rn([0-9]*)$ news.php?readmore=$2 [L,NC] |
If your Fusion isn't in the root, replace 'RewriteBase' to 'RewriteBase /<fusion_path>/' (where <fusion_path> is the folder name).
|
| Step 3 | Open Maincore.php and find:
'?>'
Above, add the following:
// Search engine friendly URLs // http://www.web-bureau.com/php-fusion-cms-c1.htm require_once INCLUDES."seoname.php"; |
|
Step 4
| Open theme.php and find:
| echo openform("N",$info['news_id']).newsopts($info,"·").closeform("N",$info['news_id']); |
Replace with:
echo openform("N",$info['news_id']).newsposter($info," ·") .seonewsopts($info,"·").closeform("N",$info['news_id']); |
|
| Step 5 | Upload the news.php which you downloaded in the beginning of the tutorial.
|
End
Everything should work now, if you run in trouble, recheck the steps above. If you still have problems, see the support thread .
|
|
#11 |
on June 29 2008 02:07:31 |  |
| |
#10 |
on June 27 2008 23:51:33 |  |
| |
#9 |
on June 25 2008 16:50:38 |  |
| |
#8 |
on June 25 2008 16:46:17 |  |
| |
#7 |
on June 23 2008 21:55:33 |  |
| |
#6 |
on June 19 2008 12:13:01 |  |
| |
#5 |
on June 18 2008 22:25:20 |  |
| |
#4 |
on June 18 2008 19:36:26 |  |
| |
#3 |
on June 18 2008 19:23:37 |  |
| |
#2 |
on May 17 2008 00:24:21 |  |
|
|
|
|
Please Login to Post a Comment.
|
|
|
Not a member yet? Click here to register.
Forgotten your password? Request a new one here.
|
Affiliates:
|
|
You must login to post a message.
|
|