• [Mod] Search Engine Friendly URLs aka Short URLs 3 0 5 1
Currently:  

Author Topic: [Mod] Search Engine Friendly URLs aka Short URLs  (Read 727226 times)

0 Members and 3 Guests are viewing this topic.

Offline rodier

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #435 on: April 23, 2008, 05:19:39 AM »
I want ask if you plan make it  little more "seo" :-)  there is another "seo" mod that make url long but readable by people..   
the problem is,  only your seo mod support  another mod here that will make sitemap.xml for google

+ im asking.. what is better.   these short anonymous url + sitemap 
or  long human readible  without sitemap ?  (for google)?

Offline Mx Man

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #436 on: August 07, 2008, 03:29:34 PM »
Hi all
Please help
I want to shorten this link:
http://sitename.com/search.htm?search_keywords=pic

To:
http://sitename.com/search-pic.htm

How can I do that
Thanks

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #437 on: October 25, 2008, 04:35:07 PM »
Hello,

i have the Gallery 1.7.6. But this Mod dont work with 1.7.6.

I Searched the Code from Step 1 in Sessions.php

The Searched Code is:


  
function url($url$amp "&") {
    global 
$l;
    
$dummy_array explode("#"$url);
    
$url $dummy_array[0];

    if (
$this->mode == "get" && !preg_match("/".SESSION_NAME."=/i"$url)) {
      
$url .= preg_match("/\?/"$url) ? "$amp"?";
      
$url .= SESSION_NAME."=".$this->session_id;
    }

    if (!empty(
$l)) {
      
$url .= preg_match("/\?/"$url) ? "$amp"?";
      
$url .= "l=".$l;
    }

    
$url .= (isset($dummy_array[1])) ? "#".$dummy_array[1] : "";
    return 
$url;
  }


But my Code is:

  
function url($url$amp "&") {
    global 
$l;
    
$dummy_array explode("#"$url);
    
$url $dummy_array[0];

    if (
$this->mode == "get" && strpos($url$this->session_id) === false) {
      
$url .= strpos($url'?') !== false $amp "?";
      
$url .= SESSION_NAME."=".$this->session_id;
    }

    if (!empty(
$l)) {
      
$url .= strpos($url'?') !== false $amp "?";
      
$url .= "l=".$l;
    }

    
$url .= (isset($dummy_array[1])) ? "#".$dummy_array[1] : "";
    return 
$url;
  }


I did it then test done


  
/*
  function url($url, $amp = "&") {
    global $l;
    $dummy_array = explode("#", $url);
    $url = $dummy_array[0];

    if ($this->mode == "get" && strpos($url, $this->session_id) === false) {
      $url .= strpos($url, '?') !== false ? $amp : "?";
      $url .= SESSION_NAME."=".$this->session_id;
    }

    if (!empty($l)) {
      $url .= strpos($url, '?') !== false ? $amp : "?";
      $url .= "l=".$l;
    }

    $url .= (isset($dummy_array[1])) ? "#".$dummy_array[1] : "";
    return $url;
  }*/
  
function url($url$amp "&") {
    global 
$l$user_info;
    
$dummy_array explode("#"$url);
    
$url $dummy_array[0];
    
$url str_replace('&''&'$url);
    if (!
defined('IN_CP')) {
      if (
strstr($url'index.php')) {
        
$url str_replace('index.php''./'$url);
      }
      elseif (
strstr($url'search.php')) {
        if (
strstr($url'page=')) {
          
preg_match('#page=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('search.php''search.'.$matches[1].'.htm'$url);
            
$query str_replace('page='.$matches[1].'&'''$query);
            
$query str_replace('&page='.$matches[1], ''$query);
            
$query str_replace('page='.$matches[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('search.php''search.htm'$url);
        }
      }
      elseif (
strstr($url'lightbox.php')) {
        if (
strstr($url'page=')) {
          
preg_match('#page=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('lightbox.php''lightbox.'.$matches[1].'.htm'$url);
            
$query str_replace('page='.$matches[1].'&'''$query);
            
$query str_replace('&page='.$matches[1], ''$query);
            
$query str_replace('page='.$matches[1], ''$query);
            if (!empty(
$query)) {
                
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('lightbox.php''lightbox.htm'$url);
        }
      }
      elseif (
strstr($url'categories.php')) {
        if (
strstr($url'cat_id=') && strstr($url'page=')) {
          
preg_match('#cat_id=([0-9]+)&?#'$url$matches1);
          
preg_match('#page=([0-9]+)&?#'$url$matches2);
          if (isset(
$matches1[1]) && isset($matches2[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('categories.php''cat'.$matches1[1].'.'.$matches2[1].'.htm'$url);
            
$query str_replace('cat_id='.$matches1[1].'&'''$query);
            
$query str_replace('&cat_id='.$matches1[1], ''$query);
            
$query str_replace('cat_id='.$matches1[1], ''$query);
            
$query str_replace('page='.$matches2[1].'&'''$query);
            
$query str_replace('&page='.$matches2[1], ''$query);
            
$query str_replace('page='.$matches2[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
        elseif (
strstr($url'cat_id=')) {
          
preg_match('#cat_id=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('categories.php''cat'.$matches[1].'.htm'$url);
            
$query str_replace('cat_id='.$matches[1].'&'''$query);
            
$query str_replace('&cat_id='.$matches[1], ''$query);
            
$query str_replace('cat_id='.$matches[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('categories.php''cat.htm'$url);
        }
      }
      elseif (
strstr($url'details.php?image_id=')) {
        if (
strstr($url'image_id=') && strstr($url'mode=')) {
          
preg_match('#image_id=([0-9]+)&?#'$url$matches1);
          
preg_match('#mode=([a-zA-Z0-9]+)&?#'$url$matches2);
          if (isset(
$matches1[1]) && isset($matches2[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('details.php''img'.$matches1[1].'.'.$matches2[1].'.htm'$url);
            
$query str_replace('image_id='.$matches1[1].'&'''$query);
            
$query str_replace('&image_id='.$matches1[1], ''$query);
            
$query str_replace('image_id='.$matches1[1], ''$query);
            
$query str_replace('mode='.$matches2[1].'&'''$query);
            
$query str_replace('&mode='.$matches2[1], ''$query);
            
$query str_replace('mode='.$matches2[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
        else {
          
preg_match('#image_id=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('details.php''img'.$matches[1].'.htm'$url);
            
$query str_replace('image_id='.$matches[1].'&'''$query);
            
$query str_replace('&image_id='.$matches[1], ''$query);
            
$query str_replace('image_id='.$matches[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
      }
      elseif (
strstr($url'postcards.php?image_id=')) {
        
preg_match('#image_id=([0-9]+)&?#'$url$matches);
        if (isset(
$matches[1])) {
          
$split explode('?'$url);
          
$url $split[0];
          
$query = @$split[1];
          
$url   str_replace('postcards.php''postcard.img'.$matches[1].'.htm'$url);
          
$query str_replace('image_id='.$matches[1].'&'''$query);
          
$query str_replace('&image_id='.$matches[1], ''$query);
          
$query str_replace('image_id='.$matches[1], ''$query);
          if (!empty(
$query)) {
            
$url .= '?' $query;
          }
        }
      }
    }
    if (
$this->mode == "get" && strstr($url$this->session_id)) {
      
$url .= strpos($url'?') !== false '&' '?';
      
$url .= SESSION_NAME."=".$this->session_id;
    }
    if (!empty(
$l)) {
      
$url .= strpos($url'?') ? '&' '?';
      
$url .= "l=".$l;
    }
    
$url str_replace('&'$amp$url);
    
$url .= isset($dummy_array[1]) ? "#".$dummy_array[1] : "";
    return 
$url;
  }


   
Then I created the htaccess!
With this Code:

# Begin search engine friendly links code
RewriteEngine On
#RewriteBase /
RewriteRule ^lightbox\.htmlightbox.php?%{QUERY_STRING}
RewriteRule ^lightbox\.([0-9]+)\.htmlightbox.php?page=$1&%{QUERY_STRING}

RewriteRule ^search\.htmsearch.php?%{QUERY_STRING}
RewriteRule ^search\.([0-9]+)\.htmsearch.php?page=$1&%{QUERY_STRING}

RewriteRule ^cat\.htmcategories.php?%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.([0-9]+)\.htmcategories.php?cat_id=$1&page=$2&%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.htmcategories.php?cat_id=$1&%{QUERY_STRING}

RewriteRule ^img([0-9]+)\.htmdetails.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.([a-zA-Z0-9]+)\.htmdetails.php?image_id=$1&mode=$2&%{QUERY_STRING}

RewriteRule ^postcard([a-zA-Z0-9]+)\.htmpostcards.php?postcard_id=$1&%{QUERY_STRING}
RewriteRule ^postcard\.img([0-9]+)\.htmpostcards.php?image_id=$1&%{QUERY_STRING}

# End search engine friendly links code


But now I can on my site no longer accessible!
This Error:
Quote
   
Server Error!

The request can not be answered because an internal server error. The server is either overloaded or an error in a CGI script has occurred.

Unless you consider it a malfunction of the server hold, please inform the Webmaster.

Then I made, as described with the PIX!

#RewriteBase /

Replace with:
RewriteBase /pix

But dont work!!!

My Complete session.php is current without the code:
please attach the files to the postForum's database space is not unlimited

My Session.php with the code:
please attach the files to the postForum's database space is not unlimited
« Last Edit: October 25, 2008, 08:28:23 PM by V@no »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #438 on: October 25, 2008, 08:29:45 PM »
Are you sure your server supports mod_rewrite? restore original sessions.php and see if site works with code in .htaccess.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #439 on: October 25, 2008, 11:31:37 PM »
Hello,

The mod_rewrite works on my server, but not in xammp! I now have my site on my server load and to the extent it works well, but the categories are no longer open.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #440 on: October 25, 2008, 11:45:42 PM »
try this code instead:
Code: [Select]
# Begin search engine friendly links code
RewriteEngine On
#RewriteBase /
RewriteRule ^lightbox\.htm$ lightbox.php?%{QUERY_STRING}
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}

RewriteRule ^search\.htm$ search.php?%{QUERY_STRING}
RewriteRule ^search\.([0-9]+)\.htm$ search.php?page=$1&%{QUERY_STRING}

RewriteRule ^cat\.htm$ categories.php?%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.htm$ categories.php?cat_id=$1&%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.([0-9]+)\.htm$ categories.php?cat_id=$1&page=$2&%{QUERY_STRING}

RewriteRule ^img([0-9]+)\.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.([a-zA-Z0-9]+)\.htm$ details.php?image_id=$1&mode=$2&%{QUERY_STRING}

RewriteRule ^postcard([a-zA-Z0-9]+)\.htm$ postcards.php?postcard_id=$1&%{QUERY_STRING}
RewriteRule ^postcard\.img([0-9]+)\.htm$ postcards.php?image_id=$1&%{QUERY_STRING}

# End search engine friendly links code
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #441 on: October 26, 2008, 12:19:54 AM »
WOW!

Thank you very much my friend!

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #442 on: October 26, 2008, 03:10:07 AM »
Hello,

I now have a bit of testing and some other links with mod_rewrite changed such as: contact.html and so forth. But a setting is not accepted it with the self-created templates to be done.

Here again what I did.

---

Hallo zusammen,

ich habe nun ein wenig getestet und einige weitere Links mit mod_rewrite geändert wie zum Beispiel: contact.html und so weiter. Aber eine Einstellung wird nicht übernommen es hat mit den selbst erstellten templates zu tun.

Hier einmal was ich gemacht habe.

Im Open: includes/session.php
Search:
elseif (strstr($url'lightbox.php')) {
add before:
      elseif (strstr($url'index.php?template=about_us')) {
        if (
strstr($url'page=')) {
          
preg_match('#page=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('index.php?template=about_us''aboutus.'.$matches[1].'.htm'$url);
            
$query str_replace('page='.$matches[1].'&'''$query);
            
$query str_replace('&page='.$matches[1], ''$query);
            
$query str_replace('page='.$matches[1], ''$query);
            if (!empty(
$query)) {
                
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('index.php?template=about_us''aboutus.htm'$url);
        }
      }


Im Open .htaccess
Search:
Code: [Select]
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}add after:
Code: [Select]
RewriteRule ^aboutus\.htm$ index.php?template=about_us?%{QUERY_STRING}
RewriteRule ^aboutus\.([0-9]+)\.htm$ index.php?template=about_us?page=$1&%{QUERY_STRING}

But that does not work. There must be something else?
The works here but also that runs at me:
-----
Aber das klappt nicht. Muss da etwas anders eingestellt werden?
Das hier klappt aber auch, dass läuft bei mir:

Code: [Select]
RewriteRule ^kontaktformular\.htm$ support.php?action=newticket?%{QUERY_STRING}
RewriteRule ^kontaktformular\.([0-9]+)\.htm$ support.php?action=newticket?page=$1&%{QUERY_STRING}

and

      elseif (strstr($url'support.php?action=newticket')) {
        if (
strstr($url'page=')) {
          
preg_match('#page=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('support.php?action=newticket''kontaktformular.'.$matches[1].'.htm'$url);
            
$query str_replace('page='.$matches[1].'&'''$query);
            
$query str_replace('&page='.$matches[1], ''$query);
            
$query str_replace('page='.$matches[1], ''$query);
            if (!empty(
$query)) {
                
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('support.php?action=newticket''kontaktformular.htm'$url);
        }
      }


That goes without problems, but that with "index.php? Template =" this is not.
---
Das klappt ohne Probleme, aber das mit "index.php?template=" das geht nicht.

   
I also wish that from index.php, will start.htm. Can this be accomplished?
---
Ich möchte auch, dass aus index.php, start.htm wird. Kann man das bewerkstelligen?

[EDIT by V@no]
Don't use [php][/php] tags for non-PHP code, it doesn't display correctly.
« Last Edit: October 26, 2008, 04:46:14 AM by V@no »

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #443 on: October 26, 2008, 04:13:58 AM »
This is not working for you ???

Code: [Select]
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ index.php?template=$1&%{QUERY_STRING}
works for me ;)

Hello, ..............................................................................
That goes without problems, but that with "index.php? Template =" this is not.
---
Das klappt ohne Probleme, aber das mit "index.php?template=" das geht nicht.

   
I also wish that from index.php, will start.htm. Can this be accomplished?
---
Ich möchte auch, dass aus index.php, start.htm wird. Kann man das bewerkstelligen?

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #444 on: October 26, 2008, 04:24:22 AM »
Hy,

I would also be grateful to you if you'd say what you've done! For me it works absolutely not!

The following is my Session.php:


      
elseif (strstr($url'index.php?template=about_us')) {
        if (
strstr($url'page=')) {
          
preg_match('#page=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('index.php?template=about_us''aboutus.'.$matches[1].'.htm'$url);
            
$query str_replace('page='.$matches[1].'&'''$query);
            
$query str_replace('&page='.$matches[1], ''$query);
            
$query str_replace('page='.$matches[1], ''$query);
            if (!empty(
$query)) {
                
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('index.php?template=about_us''aboutus.htm'$url);
        }
      }


The following is my .htaccess:

RewriteRule 
^aboutus\.htmindex.php?template=about_us?%{QUERY_STRING}
RewriteRule ^([a-zA-Z0-9_-]+)\.htmlindex.php?template=$1&%{QUERY_STRING}


But dont work :(

I must be different then the link? Would be nice if you step could explain!

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #445 on: October 26, 2008, 04:40:00 AM »
I didnt make any changes in session.php I just put above code into my .htaccess file and
I'm calling my contact.php file from menu this way

Code: [Select]
href="./contact.htm"

before I have to call that file this way

Code: [Select]
href="./contact.php"
and about_us.html like this

Code: [Select]
href="./index.php?template=about_us"
Only changes in session.php what I did are for categories, details, guestbook, top and search, that's all.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #446 on: October 26, 2008, 04:45:03 AM »
Hey,

PHP individual files so call to leave is so easy, but somehow this does not work with my code.

Really, I do not understand how you think! Show times but ask the entire code of the piece.

Because I check what is absolutely not, sorry!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #447 on: October 26, 2008, 04:48:00 AM »
This is not working for you ???

Code: [Select]
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ index.php?template=$1&%{QUERY_STRING}
works for me ;)
that would only work if you place it at the end of .htaccess

@Phisker B:
Please don't use [php][/php] tags for non-PHP code, it doesn't display correctly:
Code: [Select]
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}same code but displays different (no backslashes):
RewriteRule ^lightbox\.([0-9]+)\.htmlightbox.php?page=$1&%{QUERY_STRING}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #448 on: October 26, 2008, 04:51:55 AM »
Hey,

PHP individual files so call to leave is so easy, but somehow this does not work with my code.

Really, I do not understand how you think! Show times but ask the entire code of the piece.

Because I check what is absolutely not, sorry!

If I understand you right, you want to see your about_us when you call this file from your menu like about_us.htm
Just delete this from session.php

Code: [Select]
      elseif (strstr($url, 'index.php?template=about_us')) {
        if (strstr($url, 'page=')) {
          preg_match('#page=([0-9]+)&?#', $url, $matches);
          if (isset($matches[1])) {
            $split = explode('?', $url);
            $url = $split[0];
            $query = @$split[1];
            $url   = str_replace('index.php?template=about_us', 'aboutus.'.$matches[1].'.htm', $url);
            $query = str_replace('page='.$matches[1].'&', '', $query);
            $query = str_replace('&page='.$matches[1], '', $query);
            $query = str_replace('page='.$matches[1], '', $query);
            if (!empty($query)) {
                $url .= '?' . $query;
            }
          }
        }
        else {
          $url = str_replace('index.php?template=about_us', 'aboutus.htm', $url);
        }
      }

and this from .htaccess

Code: [Select]
RewriteRule ^aboutus.htm$ index.php?template=about_us?%{QUERY_STRING}
live this line in at the end of .htaccess

Code: [Select]
RewriteRule ^([a-zA-Z0-9_-]+).html$ index.php?template=$1&%{QUERY_STRING}
and change your link in menu template to about_us file to this

Code: [Select]
href="./about_us.html"
« Last Edit: October 26, 2008, 06:19:47 AM by om6acw »

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #449 on: October 26, 2008, 04:53:15 AM »
This is not working for you ???

Code: [Select]
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ index.php?template=$1&%{QUERY_STRING}
works for me ;)
that would only work if you place it at the end of .htaccess

@Phisker B:
Please don't use [php][/php] tags for non-PHP code, it doesn't display correctly:
Code: [Select]
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}same code but displays different (no backslashes):
RewriteRule ^lightbox\.([0-9]+)\.htmlightbox.php?page=$1&%{QUERY_STRING}

That's right V@no I forgot to mention that ;)