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

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

0 Members and 1 Guest are viewing this topic.

Offline Eagle Eye

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #300 on: May 20, 2006, 01:30:31 PM »

Offline himu

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Point Of View
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #301 on: May 21, 2006, 08:20:02 PM »
now that my
http://poview.org/categories.php?cat_id=1
changed to
http://poview.org/c1

how can i change
http://poview.org/c1?page=2
to
http://poview.org/c1.2

like v@no  :wink:

Hello V@no... pls help
here's the category section of my sessions.php
Code: [Select]
      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', 'c'.$matches1[1].'.'.$matches2[1], $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', 'c'.$matches[1], $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', 'c', $url);
        }
      }
and here's my .htaccess
Code: [Select]
RewriteRule ^c$ categories.php?%{QUERY_STRING}
RewriteRule ^c([0-9]+)\.([0-9]+)$ categories.php?cat_id=$1&page=$2&%{QUERY_STRING}
RewriteRule ^c([0-9]+)$ categories.php?cat_id=$1&%{QUERY_STRING}

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 #302 on: May 21, 2006, 09:06:46 PM »
What is the problem?
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 himu

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Point Of View
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #303 on: May 23, 2006, 02:52:43 PM »
What is the problem?
Problem is when i move my mouse over the paging links
Quote
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...  Next page »  Last page »

It shows:
http://poview.org/c1?page=2

not
http://poview.org/c1.2

but if i manually enter the address  http://poview.org/c1.2 it works.

was i able to clear my self?

Offline marod0er

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #304 on: May 25, 2006, 05:25:41 PM »
STEP 7 : change your htaccess...
here is mine :
Code: [Select]
RewriteEngine on



# REWRITE DES PAGES DETAILS

RewriteRule ^/image-(.*),([0-9]+)\.html$ /details.php?image_id=$2 [L]


# CATEGORIES

RewriteRule ^/categorie-(.*),([0-9]+),([0-9]+)\.html$ /categories.php?cat_id=$2&page=$3 [L]
RewriteRule ^/categorie-(.*),([0-9]+)\.html$ /categories.php?cat_id=$2 [L]



# SEARCH

RewriteRule ^/recherche-images\.html$ /search.php  [L]
RewriteRule ^/recherche-images,(.*),([0-9]+)\.html$ /search.php?show_result=1&search_keywords=$1&page=$2  [L]
RewriteRule ^/recherche-images,(.*)\.html$ /search.php?show_result=1&search_keywords=$1  [L]

RewriteRule ^recherches-statistiques\.html$ /search_stats.php  [L]
RewriteRule ^recherches-statistiques,([0-9]+)\.html$ /search_stats.php?page=$1  [L]



RewriteRule ^/nouvelles-images,1\.html$ /search.php?search_new_images=1  [L]
RewriteRule ^/nouvelles-images,1,([0-9]+)\.html$ /search.php?search_new_images=1&page=$1  [L]
I would like you to explain this a bit more. Is this really your htaccess file? Because it doesn't work for me. Could you please tell me what i'm doing wrong - I get a 404 error on whatever page i try to access. Thanks
Greetz: Lasse

Offline arabse

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #305 on: May 29, 2006, 04:18:20 AM »
Good The 1st page way , worked fine with 1.7.2

 :D Well Done

Offline exefire

  • Newbie
  • *
  • Posts: 30
  • FotoBomberos.com
    • View Profile
    • FotoBomberos.com
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #306 on: May 29, 2006, 11:12:16 PM »
What is the problem?
Problem is when i move my mouse over the paging links
Quote
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...  Next page »  Last page »

It shows:
http://poview.org/c1?page=2

not
http://poview.org/c1.2

but if i manually enter the address  http://poview.org/c1.2 it works.

was i able to clear my self?

i have the same problema...  :cry: :cry: :cry:

v@no: do you have any idea for this  :?:

Offline sanitarium

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #307 on: June 12, 2006, 01:30:03 AM »
My website's language is turkish. I installed this mode and work fine but I have a problem. Turkish chars to spoil in the url, exp; http://www.xxx.com/kategori-t%FCrk-amat%F6r-resimleri-13.htm. The link must be http://www.xxx.com/kategori-türk-amatör-resimleri-13.htm. How can I fix this problem? Help please...

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 #308 on: June 12, 2006, 05:32:34 AM »
You can not use non-latin letters in the urls, period.
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 Beautiful Body Castings

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #309 on: June 15, 2006, 01:20:54 AM »
i am having troubles with the mod rewrite functions

im using a server hosted at godaddy

i have seen info like the below posted on other sites but wsnt sure what it meant

Quote
"But GoDaddy didn't like that. Another solution is to use rewrite directives, like this:

  RewriteEngine on
  RewriteBase /
  RewriteRule ^index\.html$ index.php

But that didn't work either. When I searched the Internet, a lot of people seemed convinced that GoDaddy wouldn't let you do mod-rewrite stuff at all. But after a bunch of trial-and-error, I hit upon this:

  RewriteEngine on
  RewriteBase /
  RewriteRule (.*)index\.html$ $1index.php

Note the slight regular-expression change. This seems to work!"

i have read that mod rewrite is supposed to be enabled on godaddy servers and that  but when i make the changes and try it i just get the html page loaded and not the redirected php catagory page etc

and the html page is displayed in addresss bar and main site index page is actually what is displayed

i also heard that the .htaccess page takes a long time to update and something to do with godaddy being slow soemthing to do with php and .htaccess and stuff like that
anyone help any ideas?

*****updated*****

to all those using godaddy do the modifications in .htaccess and upload wait 5-10 minutes then upload modified sessions file and it all works

*****updated*****

Michael

Offline Beautiful Body Castings

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #310 on: June 15, 2006, 03:30:05 AM »
ok read the entire post all of them and im a little confused

i got the origional mod working

my site now directs to gallery{id}.htm etc(i changed cat to gallery) anyway on all pages of my site i get the problem with the drop down box to go to different catagories firstly i want to know why it goes automatically without need to pres the go button, why have the go button??

secondly why when it goes to page it just goes to gallery.htm without the id of the catagory (it loads the correct catagory etc but address bar just says mysite etc gallery.htm)

can anyone please help

also is there a good solid mod download or single description for doing the second version with catagory and image names in the .htm page name  so i would have something like gallery-{galleryname}-{id}.htm and similar for images

as its all over this posts and i cant make out which bits go where when im reading several posts

thanks

Michael

Offline Jedigaz

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #311 on: June 15, 2006, 05:52:00 PM »
Dunno if i should post this here but the day after i did this `mod` im getting this error wih no thumbs on main page and this error above my banner



Warning: session_start(): open(/tmp/sess_3fed97d856e790dc7dff1bd387b34c2f, O_RDWR) failed: Permission denied (13) in /home/gazfxcom/public_html/includes/sessions.php on line 86

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (0) ORDER BY i.image_date DESC LIMIT 20
Can't create/write to file '/tmp/#sql_1421_0.MYI' (Errcode: 13)
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/gazfxcom/public_html/includes/db_mysql.php on line 116




i have no idea as to why this is happening because my site www.gazfx.com has been working fine up until just a couple of hours ago..any help as always greatly appreciated

Offline Jedigaz

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #312 on: June 15, 2006, 06:58:28 PM »
It is now working again but all on its own..the error isnt there anymore and the thumbs have returned...

why i am i posting u may ask..

basically because i am interested to know why this happened so i can learn..

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 #313 on: June 16, 2006, 01:16:51 AM »
Something happend on the server, perhaps MySQL crashed.
When you see errors about .MYI files, first thing you should do is contact your host administrator so they could investigate the failure and while they do that you can try repair the tables in the database from phpmyadmin or any other mysql manager.
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 bydlo

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [Mod] Search Engine Friendly URLs aka Short URLs
« Reply #314 on: June 29, 2006, 03:23:18 PM »
moin moin,
bräuchte zu diesem thema auch mal hilfe.
habe wie in dem eingangspost beschrieben die session.php veändert.

habe die htaccess ins verzeichnis gelegt in dem die installation liegt.

habe sowohl die versionen mit rewrite base (auch auskommentiert) als auch ohne versucht.

die session IDs sind immer noch da.

hier mal meine htaccess
Quote
# Begin search engine friendly links code
RewriteEngine On
# RewriteBase /download/
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]+)\.([0-9]+)\.htm$ categories.php?cat_id=$1&page=$2&%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.htm$ categories.php?cat_id=$1&%{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

die URL der anwendung:
www.axellauer.de/download/

PS: zur vorbeugung von missverständen.
die anwendung liegt zwar schon auf meinem server ist aber noch nicht verlinkt (also nicht öffentlich)

gruss axel