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-Fusion

Asked Modified Viewed 77,168 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

[mp]502[/mp]
Edited by Ankur on 23-07-2012 12:33,
0 replies

141 posts

J
jikaka
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
answered
Veteran Member

Ankur - big master!
0 replies
H
Hal Ricard
H
Hal Ricard
  • Member, joined since
  • Contributed 95 posts on the community forums.
  • Started 12 threads in the forums
answered
Member

-
I have not done the installation but this kind of addon is one of the basic things that
every content management system should have.. Good Job! :)
-
0 replies
W
wheeler
W
Michael Wheeler
  • Member, joined since
  • Contributed 87 posts on the community forums.
  • Started 21 threads in the forums
answered
Member

Works really well im impressed with it, initial problem though - some panels on my site now dont display, strange..
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Good job ankur, very very thanks. :)
0 replies
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
answered
Veteran Member

Thank You all for your comments :)

Quote

wheeler wrote:

Works really well im impressed with it, initial problem though - some panels on my site now dont display, strange..


I guess that there is a fix for that which is explained in the Readme... ;)
0 replies
M
MattMadsen
M
Facebook site
https://www.facebook.com/Detherersjovt
The funniest facebook page in the world
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

I have a question.
On my side writes the
http://www.nook.dk/News-124-Universitet-laver-gigapixelkamera.html
Can you get it to be
http://www.nook.dk/124-Universitet-laver-gigapixelkamera.html
0 replies
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
answered
Veteran Member

Quote

MattMadsen wrote:

I have a question.
On my side writes the
http://www.nook.dk/News-124-Universitet-laver-gigapixelkamera.html
Can you get it to be
http://www.nook.dk/124-Universitet-laver-gigapixelkamera.html


Sure
www.php-fusion.co.uk/images/smiley/smile.gif


In .htaccess, find this Code :
## News and News Cats

RewriteRule ^News(\.html)?$ news.php [L,NC]
RewriteRule ^News-rowstart-([0-9]{1,15})(\.html)?$ news.php?rowstart=$1 [L,NC]
RewriteRule ^News-([0-9]{1,15})-commentstart-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1&c_start=$2 [L,NC]
RewriteRule ^News-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]
RewriteRule ^News-Categories(\.html)?$ news_cats.php [L,NC]
RewriteRule ^News-Category-([0-9]{1,15})-(.*)(\.html)?$ news_cats.php?cat_id=$1 [L,NC]


Change the Line :
RewriteRule ^News-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]

to :
RewriteRule ^([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]


And in \infusions\seo_friendly_urls_panel\includes\seo_functions.php, find :
function replace_news($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."News-".$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 8) !=0) ? "-commentstart-".substr($matches[4], 8)."-" : "-").cleanmytext($data_cache['news'][$matches[2]]).URL_POSTFIX.(array_key_exists(6, $matches) ? $matches[6] : "").(array_key_exists(5, $matches) ? $matches[5] : "")."'";
   return $replace;
}


Change :
   $replace = "'".$matches[1]."News-".$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 8) !=0) ? "-commentstart-".substr($matches[4], 8)."-" : "-").cleanmytext($data_cache['news'][$matches[2]]).URL_POSTFIX.(array_key_exists(6, $matches) ? $matches[6] : "").(array_key_exists(5, $matches) ? $matches[5] : "")."'";

to :
   $replace = "'".$matches[1].$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 8) !=0) ? "-commentstart-".substr($matches[4], 8)."-" : "-").cleanmytext($data_cache['news'][$matches[2]]).URL_POSTFIX.(array_key_exists(6, $matches) ? $matches[6] : "").(array_key_exists(5, $matches) ? $matches[5] : "")."'";


Done
www.php-fusion.co.uk/images/smiley/good.png
0 replies
W
wheeler
W
Michael Wheeler
  • Member, joined since
  • Contributed 87 posts on the community forums.
  • Started 21 threads in the forums
answered
Member

Ankur,

Do you have the fix for this theres nothing in the readme :)
0 replies
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
answered
Veteran Member

Quote

wheeler wrote:

Ankur,

Do you have the fix for this theres nothing in the readme :)


There is a modification given for maincore.php in the Readme. That will do it for you... :)

Alternatively, you may read that at : http://www.phpfusionmods.co.uk/forum/...#post_6374
0 replies
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
answered
Veteran Member

[size=20]For those People, who are facing problems with Panel Display on Homepage :[/size]

Edit maincore.php and find this Line :
define("TRUE_PHP_SELF", $current_page);


If you are using HTML Type URLs for SEO, then Replace it with :
if (preg_match("/\/(administration)\//", $current_page))
{
   define("TRUE_PHP_SELF", $current_page);
}
else
{
   define("TRUE_PHP_SELF", str_replace(".php", ".html", $current_page));
}


If you are using Plain Type URLs for SEO, then Replace it with :
if (preg_match("/\/(administration)\//", $current_page))
{
   define("TRUE_PHP_SELF", $current_page);
}
else
{
   define("TRUE_PHP_SELF", str_replace(".php", "", $current_page));
}


Done !
0 replies
S
Sprunkas
S
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

How to do, that replace UTF8 symbols to normal? (Ą-A, Č-C, Ę-E and etc...)
0 replies
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
answered
Veteran Member

Quote

Sprunkas wrote:

How to do, that replace UTF8 symbols to normal? (Ą-A, Č-C, Ę-E and etc...)


Just edit seo_friendly_urls_panel.php and find this Function :
function cleanmytext($text)
{
   $text = preg_replace("/[^a-zA-Z0-9_-\s]/", "", $text);
   $text = str_replace(" ", "-", $text);
   $text = preg_replace("/([\s\s]+|[--]+)/", "-", $text);
   return $text;
}

Remove this Line from the function :
$text = preg_replace("/[^a-zA-Z0-9_-\s]/", "", $text);


Done !!! Hope it works for you !
0 replies
S
Sprunkas
S
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

Quote

Ankur wrote:

Quote

Sprunkas wrote:

How to do, that replace UTF8 symbols to normal? (Ą-A, Č-C, Ę-E and etc...)


Just edit seo_friendly_urls_panel.php and find this Function :
function cleanmytext($text)
{
   $text = preg_replace("/[^a-zA-Z0-9_-\s]/", "", $text);
   $text = str_replace(" ", "-", $text);
   $text = preg_replace("/([\s\s]+|[--]+)/", "-", $text);
   return $text;
}

Remove this Line from the function :
$text = preg_replace("/[^a-zA-Z0-9_-\s]/", "", $text);


Done !!! Hope it works for you !


It's works, but how to replace UTF8 symbols to normals?
0 replies
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
answered
Veteran Member

Quote

Sprunkas wrote:

It's works, but how to replace UTF8 symbols to normals?


Can you please elaborate your problem ? How you want to replace UTF-8 symbols and where? Please provide your website Link so that I can help you little more easily... B)
0 replies
M
MattMadsen
M
Facebook site
https://www.facebook.com/Detherersjovt
The funniest facebook page in the world
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

Quote

Ankur wrote:

Quote

MattMadsen wrote:

I have a question.
On my side writes the
http://www.nook.dk/News-124-Universitet-laver-gigapixelkamera.html
Can you get it to be
http://www.nook.dk/124-Universitet-laver-gigapixelkamera.html


Sure
www.php-fusion.co.uk/images/smiley/smile.gif


In .htaccess, find this Code :
## News and News Cats

RewriteRule ^News(\.html)?$ news.php [L,NC]
RewriteRule ^News-rowstart-([0-9]{1,15})(\.html)?$ news.php?rowstart=$1 [L,NC]
RewriteRule ^News-([0-9]{1,15})-commentstart-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1&c_start=$2 [L,NC]
RewriteRule ^News-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]
RewriteRule ^News-Categories(\.html)?$ news_cats.php [L,NC]
RewriteRule ^News-Category-([0-9]{1,15})-(.*)(\.html)?$ news_cats.php?cat_id=$1 [L,NC]


Change the Line :
RewriteRule ^News-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]

to :
RewriteRule ^([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]


And in \infusions\seo_friendly_urls_panel\includes\seo_functions.php, find :
function replace_news($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."News-".$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 8) !=0) ? "-commentstart-".substr($matches[4], 8)."-" : "-").cleanmytext($data_cache['news'][$matches[2]]).URL_POSTFIX.(array_key_exists(6, $matches) ? $matches[6] : "").(array_key_exists(5, $matches) ? $matches[5] : "")."'";
   return $replace;
}


Change :
   $replace = "'".$matches[1]."News-".$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 8) !=0) ? "-commentstart-".substr($matches[4], 8)."-" : "-").cleanmytext($data_cache['news'][$matches[2]]).URL_POSTFIX.(array_key_exists(6, $matches) ? $matches[6] : "").(array_key_exists(5, $matches) ? $matches[5] : "")."'";

to :
   $replace = "'".$matches[1].$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 8) !=0) ? "-commentstart-".substr($matches[4], 8)."-" : "-").cleanmytext($data_cache['news'][$matches[2]]).URL_POSTFIX.(array_key_exists(6, $matches) ? $matches[6] : "").(array_key_exists(5, $matches) ? $matches[5] : "")."'";


Done
www.php-fusion.co.uk/images/smiley/good.png


I get erro page.

Not Found

The requested URL /131-Massakre-ved-premiere-for-quotThe-Dark-Knight-Risesquot-i-USA.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.33 Server at www.nook.dk Port 80


Heres the code for Seo
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Infusion: SEO Friendly URLs for PHPFusion
| Filename: SEO_Functions.php
| Version: 1.00
| Author: Ankur Thakur
| Developers: Ankur Thakur
| Web : http://ankurthakur.co.cc/
|       http://php-fusion.in/
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

/*----------+
|   USERS   |
+----------*/
function replace_users($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Profile-".$matches[2]."-".cleanmytext($data_cache['users'][$matches[2]]).URL_POSTFIX."'";
   return $replace;
}

/*-----------+
|   GROUPS   |
+-----------*/
function replace_groups($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Group-".$matches[2]."-".cleanmytext($data_cache['groups'][$matches[2]]).URL_POSTFIX."'";
   return $replace;
}

/*-----------------+
|   CUSTOM PAGES   |
+-----------------*/
function replace_custom_pages($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Page-".$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 9) !=0) ? "-rowstart-".substr($matches[4], 9)."-" : "-").cleanmytext($data_cache['custom_pages'][$matches[2]]).URL_POSTFIX.(array_key_exists(5, $matches) ? $matches[5] : "")."'";
   return $replace;
}

/*-----------+
|    NEWS    |
+-----------*/
function replace_news($matches)
{
   global $data_cache;
   $replace = "'".$matches[1].$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 8) !=0) ? "-commentstart-".substr($matches[4], 8)."-" : "-").cleanmytext($data_cache['news'][$matches[2]]).URL_POSTFIX.(array_key_exists(6, $matches) ? $matches[6] : "").(array_key_exists(5, $matches) ? $matches[5] : "")."'";;
   return $replace;
}

/*--------------+
|   NEWS CATS   |
+--------------*/
function replace_news_cats($matches)
{
   global $data_cache, $locale;
   if ($matches[2] == 0)   {
      $replace = "'".$matches[1]."News-Category-".$matches[2]."-".cleanmytext($locale['global_080']).URL_POSTFIX."'";   // $locale['global_080'] = Uncategorised
   }
   else   {
      $replace = "'".$matches[1]."News-Category-".$matches[2]."-".cleanmytext($data_cache['news_cats'][$matches[2]]).URL_POSTFIX."'";
   }
   return $replace;
}

/*-------------+
|   ARTICLES   |
+-------------*/
function replace_articles($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Article-".$matches[2].((array_key_exists(4, $matches) && substr($matches[4], 8) != 0) ? "-commentstart-".substr($matches[4], 8)."-" : "-").cleanmytext($data_cache['articles'][$matches[2]]).URL_POSTFIX.(array_key_exists(5, $matches) ? $matches[5] : "")."'";
   return $replace;
}

/*-----------------+
|   ARTICLE CATS   |
+-----------------*/
function replace_articles_cats($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Article-Category-".$matches[2].(array_key_exists(4, $matches) ? "-rowstart-".substr($matches[4], 9)."-" : "-").cleanmytext($data_cache['articles_cats'][$matches[2]]).URL_POSTFIX."'";
   return $replace;
}

/*--------------+
|   DOWNLOADS   |
+--------------*/
function replace_downloads($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Download-".$matches[4]."-".cleanmytext($data_cache['downloads'][$matches[4]]).URL_POSTFIX.(array_key_exists(5, $matches) ? $matches[5] : "")."'";
   return $replace;
}

/*-------------------+
|   DOWNLOADS CATS   |
+-------------------*/
function replace_downloads_cats($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Download-Category-".$matches[2]."-".cleanmytext($data_cache['downloads_cats'][$matches[2]]).URL_POSTFIX."'";
   return $replace;
}

/*-----------------+
|   PHOTO-ALBUMS   |
+-----------------*/
function replace_photoalbums($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Photogallery-Album-".$matches[2].(array_key_exists(3, $matches) ? "-".substr($matches[3], 14)."-" : "-").cleanmytext($data_cache['photo_albums'][$matches[2]]).URL_POSTFIX."'";
   return $replace;
}

/*-----------+
|   PHOTOS   |
+-----------*/
function replace_photos($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Photo-".$matches[2]."-".cleanmytext($data_cache['photos'][$matches[2]]).URL_POSTFIX.(array_key_exists(3, $matches) ? $matches[3] : "")."'";
   return $replace;
}

/*-------------+
|   WEBLINKS   |
+-------------*/
function replace_weblinks($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Weblink-".$matches[4]."-".cleanmytext($data_cache['weblinks'][$matches[4]]).URL_POSTFIX."'";
   return $replace;
}

/*------------------+
|   WEBLINKS CATS   |
+------------------*/
function replace_weblinks_cats($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."Weblinks-Category-".$matches[2].(array_key_exists(4, $matches) ? "-rowstart-".substr($matches[4], 9)."-" : "-").cleanmytext($data_cache['weblinks_cats'][$matches[2]]).URL_POSTFIX."'";
   return $replace;
}

/*------------+
|   THREADS   |
+------------*/
function replace_threads($matches)
{
   global $data_cache;
   $replace = "'".$matches[1].$matches[2]."Thread-".$matches[3].((array_key_exists(5, $matches) && substr($matches[5], 4) != "") ? "-Post-".substr($matches[5], 4) : "").((array_key_exists(6, $matches) && (substr($matches[6], 9) != 0)) ? "-rowstart-".substr($matches[6], 9) : "")."-".cleanmytext($data_cache['threads'][$matches[3]]).URL_POSTFIX.(array_key_exists(7, $matches) ? $matches[7] : "")."'";
   return $replace;
}

/*-----------+
|   FORUMS   |
+-----------*/
function replace_forums($matches)
{
   global $data_cache;
   $replace = "'".$matches[1].$matches[2]."Forum-".$matches[3].(array_key_exists(4, $matches) ? "-rowstart-".substr($matches[4], 14)."-" : "-").cleanmytext($data_cache['forums'][$matches[3]]).URL_POSTFIX."'";
   return $replace;
}

/*-------------+
|   FAQ CATS   |
+-------------*/
function replace_faqs_cats($matches)
{
   global $data_cache;
   $replace = "'".$matches[1]."FAQ-Category-".$matches[2]."-".cleanmytext($data_cache['faqs_cats'][$matches[2]]).URL_POSTFIX.(array_key_exists(3, $matches) ? $matches[3] : "")."'";
   return $replace;
}

/*----------------+
|   SUBMISSIONS   |
+----------------*/
function replace_submissions($matches)
{
   if ($matches[2] == "p")   {
      $replace = "'".$matches[1]."Submit-Photo".URL_POSTFIX."'";
   }
   if ($matches[2] == "a")   {
      $replace = "'".$matches[1]."Submit-Article".URL_POSTFIX."'";
   }
   if ($matches[2] == "n")   {
      $replace = "'".$matches[1]."Submit-News".URL_POSTFIX."'";
   }
   if ($matches[2] == "l")   {
      $replace = "'".$matches[1]."Submit-Link".URL_POSTFIX."'";
   }
   if ($matches[2] == "d")   {
      $replace = "'".$matches[1]."Submit-Download".URL_POSTFIX."'";
   }
   return $replace;
}

/*-------------+
|   MESSAGES   |
+-------------*/
function replace_messages($matches)
{
   if ($matches[2] == "inbox")   {
      $replace = "'".$matches[1]."Messages-Inbox".URL_POSTFIX."'";
   }
   if ($matches[2] == "outbox")   {
      $replace = "'".$matches[1]."Messages-Outbox".URL_POSTFIX."'";
   }
   if ($matches[2] == "archive")   {
      $replace = "'".$matches[1]."Messages-Archive".URL_POSTFIX."'";
   }
   if ($matches[2] == "options")   {
      $replace = "'".$matches[1]."Messages-Options".URL_POSTFIX."'";
   }
   return $replace;
}

/*-----------------+
|   MEMBERS LIST   |
+-----------------*/
function replace_members_list($matches)
{
   $replace = "'".$matches[1]."Members-Sortby-".$matches[2].(array_key_exists(3, $matches) ? "-rowstart-".substr($matches[3], 14) : "").URL_POSTFIX."'";
   return $replace;
}

/*-----------------+
|   NORMAL PAGES   |
+-----------------*/
function replace_normal_pages($matches)
{
   $replace = "'".$matches[1].ucfirst($matches[2]).URL_POSTFIX."'";
   return $replace;
}

/*----------------+
|   PRINT PAGES   |
+----------------*/
function replace_print_pages($matches)
{
   global $data_cache;

   if ($matches[2] == "N")   {
      $replace = "'".$matches[1]."Print-News-".substr($matches[4], 8)."-".cleanmytext($data_cache['news'][substr($matches[4], 8)]).URL_POSTFIX."'";
   }
   if ($matches[2] == "A")   {
      $replace = "'".$matches[1]."Print-Article-".substr($matches[4], 8)."-".cleanmytext($data_cache['articles'][substr($matches[4], 8)]).URL_POSTFIX."'";
   }
   if ($matches[2] == "F")   {
      $replace = "'".$matches[1]."Print-Thread-".substr($matches[5], 7).((array_key_exists(7, $matches) && substr($matches[7], 5) != 0) ? "-Post-".substr($matches[7], 5) : "").((array_key_exists(9, $matches) && substr($matches[9], 3)) ? "-nr-".substr($matches[9], 3) : "")."-".cleanmytext($data_cache['threads'][substr($matches[5], 7)]).URL_POSTFIX."'";
   }
   if ($matches[2] == "T")   {
      $replace = "'".$matches[1]."Terms-of-Agreement".URL_POSTFIX."'";
   }
   return $replace;
}

?>


And her for .htacces
##########################
#                        #
#       SEO-FUSION       #
#                        #
#         v1.00          #
#                        #
#  Author: Ankur Thakur  #
#                        #
##########################

####################
#                  #
#  Rewrite Engine  #
#                  #
####################

RewriteEngine on

##################################################################################
#                                                                                #
#  Rewrite-Base                                                                  #
#  If you are running this script in your root-folder:                           #
#  RewriteBase /                                                                 #
#  If you are NOT running this script in your root-folder, but in a sub folder:  #
#  RewriteBase /your_folder/                                                     #
#                                                                                #
##################################################################################

RewriteBase /

##############
#            #
#  Rewrites  #
#            #
##############

######################################################################
#                                                                    #
#  [NC] --> Case Insensitive URL                                     #
#                                                                    #
#  It means that both UpperCase and LowerCase URLs will be allowed.  #
#                                                                    #
######################################################################

## Index Page

RewriteRule ^index(\.html)?$ index.php [L,NC]

## Users and Groups

RewriteRule ^Profile-([0-9]{1,15})-(.*)(\.html)?$ profile.php?lookup=$1 [L,NC]
RewriteRule ^Group-([0-9]{1,15})-(.*)(\.html)?$ profile.php?group_id=$1 [L,NC]

## Custom Pages

RewriteRule ^Page-([0-9]+)-rowstart-([0-9]+)-(.*)(\.html)?$ viewpage.php?page_id=$1&rowstart=$2 [L,NC]
RewriteRule ^Page-([0-9]+)-(.*)(\.html)?$ viewpage.php?page_id=$1 [L,NC]

## News and News Cats

RewriteRule ^News(\.html)?$ news.php [L,NC]
RewriteRule ^News-rowstart-([0-9]{1,15})(\.html)?$ news.php?rowstart=$1 [L,NC]
RewriteRule ^News-([0-9]{1,15})-commentstart-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1&c_start=$2 [L,NC]
RewriteRule ^News-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]
RewriteRule ^News-Categories(\.html)?$ news_cats.php [L,NC]
RewriteRule ^News-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]

## Articles and Article Cats

RewriteRule ^Articles(\.html)?$ articles.php [L,NC]
RewriteRule ^Article-([0-9]{1,15})-commentstart-([0-9]{1,15})-(.*)(\.html)?$ articles.php?article_id=$1&c_start=$2 [L,NC]
RewriteRule ^Article-([0-9]{1,15})-(.*)(\.html)?$ articles.php?article_id=$1 [L,NC]
RewriteRule ^Article-Category-([0-9]{1,15})-rowstart-([0-9]{1,15})-(.*)(\.html)?$ articles.php?cat_id=$1&rowstart=$2 [L,NC]
RewriteRule ^Article-Category-([0-9]{1,15})-(.*)(\.html)?$ articles.php?cat_id=$1 [L,NC]

## Downloads and Download Cats

RewriteRule ^Downloads(\.html)?$ downloads.php [L,NC]
RewriteRule ^Download-Category-([0-9]{1,15})-page-([0-9]{1,15})-(.*)(\.html)?$ downloads.php?cat_id=$1&page=$2 [L,NC]
RewriteRule ^Download-([0-9]{1,15})-cat-([0-9]{1,15})-(.*)(\.html)?$ downloads.php?cat_id=$2&download_id=$1 [L,NC]
RewriteRule ^Download-Category-([0-9]{1,15})-(.*)(\.html)?$ downloads.php?cat_id=$1 [L,NC]
RewriteRule ^Download-([0-9]{1,15})-(.*)(\.html)?$ downloads.php?download_id=$1 [L,NC]

## FAQ

RewriteRule ^FAQ(\.html)?$ faq.php [L,NC]
RewriteRule ^FAQ-Category-([0-9]{1,15})-(.*)(\.html)?$ faq.php?cat_id=$1 [L,NC]

## Photo Albums and Photos

RewriteRule ^Photogallery(\.html)?$ photogallery.php [L,NC]
RewriteRule ^Photogallery-([0-9]+)(\.html)?$ photogallery.php?page=$1 [L,NC]
RewriteRule ^Photogallery-Album-([0-9]+)-([0-9]+)-(.*)(\.html)?$ photogallery.php?album_id=$1&rowstart=$2 [L,NC]
RewriteRule ^Photogallery-Album-([0-9]+)-(.*)(\.html)?$ photogallery.php?album_id=$1 [L,NC]
RewriteRule ^Photo-([0-9]+)-(.*)(\.html)?$ photogallery.php?photo_id=$1 [L,NC]

## Weblinks and Weblink Cats

RewriteRule ^Weblinks(\.html)?$ weblinks.php [L,NC]
RewriteRule ^Weblinks-Category-([0-9]{1,15})-rowstart-([0-9]{1,15})-(.*)(\.html)?$ weblinks.php?cat_id=$1&rowstart=$2 [L,NC]
RewriteRule ^Weblinks-Category-([0-9]{1,15})-(.*)(\.html)?$ weblinks.php?cat_id=$1 [L,NC]
RewriteRule ^Weblink-([0-9]{1,15})-(.*)(\.html)?$ weblinks.php?weblink_id=$1 [L,NC]

## Forums

RewriteRule ^forum\/index(\.html)?$ forum/index.php [L,NC]
## Incase the user entered anything except numbers then redirect him to forum index
RewriteRule ^forum\/Forum-([^0-9]+)(\.html)?$ forum/index.php [L,NC]
RewriteRule ^forum\/Forum-([0-9]+)-rowstart-([0-9]+)-(.*)(\.html)?$ forum/viewforum.php?forum_id=$1&rowstart=$2 [L,NC]
RewriteRule ^forum\/Forum-([0-9]+)-(.*)(\.html)?$ forum/viewforum.php?forum_id=$1 [L,NC]

## Threads

RewriteRule ^forum\/Thread-([0-9]+)-Post-([0-9]+)-(.*)(\.html)$ forum/viewthread.php?thread_id=$1&pid=$2 [L,NC]
RewriteRule ^forum\/Thread-([0-9]+)-rowstart-([0-9]+)-(.*)(\.html)?$ forum/viewthread.php?thread_id=$1&rowstart=$2 [L,NC]
RewriteRule ^forum\/Thread-([0-9]+)-(.*)(\.html)?$ forum/viewthread.php?thread_id=$1 [L,NC]
RewriteRule ^forum\/New-Thread-([0-9]+)(\.html)?$ forum/post.php?action=newthread&forum_id=$1 [L,NC]

## Submissions

RewriteRule ^Submit-Photo(\.html)?$ submit.php?stype=p [L,NC]
RewriteRule ^Submit-Article(\.html)?$ submit.php?stype=a [L,NC]
RewriteRule ^Submit-News(\.html)?$ submit.php?stype=n [L,NC]
RewriteRule ^Submit-Link(\.html)?$ submit.php?stype=l [L,NC]
RewriteRule ^Submit-Download(\.html)?$ submit.php?stype=d [L,NC]

## Messages

RewriteRule ^Messages(\.html)?$ messages.php [NC]
RewriteRule ^Messages-Inbox(\.html)?$ messages.php?folder=inbox [NC]
RewriteRule ^Messages-Outbox(\.html)?$ messages.php?folder=outbox [NC]
RewriteRule ^Messages-Archive(\.html)?$ messages.php?folder=archive [NC]
RewriteRule ^Messages-Options(\.html)?$ messages.php?folder=options [NC]
RewriteRule ^Compose-Message-([0-9]+)(\.html)?$ messages.php?msg_send=$1 [L,NC]

## Print Pages

RewriteRule ^Print-News-([0-9]+)-(.*)(\.html)?$ print.php?type=N&item_id=$1 [L,NC]
RewriteRule ^Print-Article-([0-9]+)-(.*)(\.html)?$ print.php?type=A&item_id=$1 [L,NC]
RewriteRule ^Print-Thread-([0-9]+)-Post-([0-9]+)-nr-([0-9]+)-(.*)(\.html)?$ print.php?type=F&thread=$1&post=$2&nr=$3 [L,NC]
RewriteRule ^Print-Thread-([0-9]+)-(.*)(\.html)?$ print.php?type=F&thread=$1 [L,NC]
RewriteRule ^Terms-of-Agreement(\.html)?$ print.php?type=T [L,NC]

## Contact

RewriteRule ^Contact(\.html)?$ contact.php [NC]

## Register, Lost Password

RewriteRule ^Register(\.html)?$ register.php [NC]
RewriteRule ^Lostpassword(\.html)?$ lostpassword.php [NC]

## Maintenance

RewriteRule ^Maintenance(\.html)?$ maintenance.php [NC]

## Members

RewriteRule ^Members(\.html)?$ members.php [NC]
RewriteRule ^Members-Sortby-([a-zA-Z0-9_]+)-rowstart-([0-9]+)(\.html)?$ members.php?sortby=$1&rowstart=$2 [L]
RewriteRule ^Members-rowstart-([a-zA-Z0-9_]+)(\.html)?$ members.php?page=$1 [L]
RewriteRule ^Members-Sortby-([a-zA-Z0-9_]+)(\.html)?$ members.php?sortby=$1 [L]

## Edit Profile

RewriteRule ^Edit_Profile(\.html)?$ edit_profile.php [L,NC]

## Search

RewriteRule ^Search(\.html)?$ search.php [NC]

## Login, Logout

RewriteRule ^logout(\.html)?$ index.php?logout=yes [L,NC]
RewriteRule ^Login(\.html)?$ login.php [L,NC]

## Infusions General Files

RewriteRule ^infusions\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)(\.html)?$ infusions/$1/$2.php [L,NC]
0 replies
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
answered
Veteran Member

Quote

MattMadsen wrote:

I get erro page.

Not Found

The requested URL /131-Massakre-ved-premiere-for-quotThe-Dark-Knight-Risesquot-i-USA.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.33 Server at www.nook.dk Port 80



Dude, you forgot to make changes in .htaccess file.... ;)

If you are going to make changes permanently, then Replace with this Code in .htaccess for News :
## News and News Cats

RewriteRule ^News(\.html)?$ news.php [L,NC]
RewriteRule ^News-rowstart-([0-9]{1,15})(\.html)?$ news.php?rowstart=$1 [L,NC]
RewriteRule ^([0-9]{1,15})-commentstart-([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1&c_start=$2 [L,NC]
RewriteRule ^([0-9]{1,15})-(.*)(\.html)?$ news.php?readmore=$1 [L,NC]
RewriteRule ^News-Categories(\.html)?$ news_cats.php [L,NC]
RewriteRule ^News-Category-([0-9]{1,15})-(.*)(\.html)?$ news_cats.php?cat_id=$1 [L,NC]


Good Luck :)
0 replies
M
MattMadsen
M
Facebook site
https://www.facebook.com/Detherersjovt
The funniest facebook page in the world
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

Its working. Thanks.. smile
Edited by MattMadsen on 21-07-2012 17:55,
0 replies
S
Sprunkas
S
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

Quote

Ankur wrote:

Quote

Sprunkas wrote:

It's works, but how to replace UTF8 symbols to normals?


Can you please elaborate your problem ? How you want to replace UTF-8 symbols and where? Please provide your website Link so that I can help you little more easily... cool


Problem as here:
www.phpfusion.info/images/articles/207.png

But i don't need to display UTF8 symbols, i need to replace them (&#260; to A, &#268; to C and etc..) but as i see here, when i insert UTF8 symbol it converts to code.
0 replies
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
answered
Veteran Member

Quote

Sprunkas wrote:

But i don't need to display UTF8 symbols, i need to replace them (&#260; to A, &#268; to C and etc..) but as i see here, when i insert UTF8 symbol it converts to code.


Oh I see...!

Try to edit seo_friendly_urls_panel.php and find this Function :
function cleanmytext($text)
{
   $text = preg_replace("/[^a-zA-Z0-9_-\s]/", "", $text);
   $text = str_replace(" ", "-", $text);
   $text = preg_replace("/([\s\s]+|[--]+)/", "-", $text);
   return $text;
}


Try Changing the first Line :
$text = preg_replace("/[^a-zA-Z0-9_-\s]/", "", $text);

to :
$text = utf8_encode($text);


I hope it will make your wish... ;)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 141 posts
  • Votes 0 votes
  • Topic users 44 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet