Forum Moderators: phranque

Message Too Old, No Replies

rewrite SOBI2 in Joomla

rewrite SOBI2 in Joomla

         

abuzurah

9:26 pm on Mar 30, 2009 (gmt 0)

10+ Year Member



How to rewrite SOBI2 url in Joomla?

how can remove "sobi2Task=sobi2Details&" and "sobi2" from url? for example:

[localhost...]

to
[localhost...]

i don't know every things about htaccess. please help.

the htaccess in Joomla is :

<snip>

[edited by: jdMorgan at 2:53 am (utc) on Mar. 31, 2009]
[edit reason] Do not post copyrighted material! [/edit]

g1smd

9:39 pm on Mar 30, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You remove it by linking on the page to a URL that does not contain those items.

It is links that define URLs. Change the links on the pages.

Next, set up a rewrite to connect those URL requests to the real internal server location that will server that content.

Finally, set up a redirect so that requests for old URLs are redirected to the new URL.

abuzurah

10:36 pm on Mar 30, 2009 (gmt 0)

10+ Year Member



RewriteRule ^directory?catid=([^/]+)&Id([^/]+)/?$ /index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=$1&sobi2Id=$2&Itemid=2 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?option=com_sobi2&sobi2Task=sobi2Details([^&]+)&catid=([^&]+)&sobi2Id=([^&]+)&Itemid=2\ HTTP/
RewriteRule ^index\.php$ [localhost...] [R=301,L]

I have this rewrite, but nothing happend. ?

can anyone help me.. iam a beginner.

jdMorgan

2:57 am on Mar 31, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can't say I understand the problem well, but the first rule needs a RewriteCond to check and back-reference the query string:

RewriteCond %QUERY_STRING ^catid=([^&]+)&Id=([^&]+)
RewriteRule ^directory?$ /index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=%1&sobi2Id=%2&Itemid=2 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?option=com_sobi2&sobi2Task=sobi2Details([^&]+)&catid=([^&]+)&sobi2Id=([^&]+)&Itemid=2\ HTTP/
RewriteRule ^index\.php$ http://localhost/directory?catid=%1Id=%2? [R=301,L]

It is likely that at least some details are still incorrect...

Jim

abuzurah

8:02 am on Mar 31, 2009 (gmt 0)

10+ Year Member




I can't say I understand the problem well, but the first rule needs a RewriteCond to check and back-reference the query string:

RewriteCond %QUERY_STRING ^catid=([^&]+)&Id=([^&]+)
RewriteRule ^directory?$ /index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=%1&sobi2Id=%2&Itemid=2 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?option=com_sobi2&sobi2Task=sobi2Details([^&]+)&catid=([^&]+)&sobi2Id=([^&]+)&Itemid=2\ HTTP/
RewriteRule ^index\.php$ [localhost...] [R=301,L]

It is likely that at least some details are still incorrect...

Thanks for your Reply.

I have do this, but nothigs happend

for your information:

  • I'm using Joomla 1.5.10 and SOBI2, when the SEF and mod_rewrite inactive, the real url is [localhost...]
  • when the SEF and mod_rewrite is active, the url is [localhost...]
  • my site is SEF and mod_rewrite active

    all thing what I want is, remove the "sobi2Task=sobi2Details".

  • g1smd

    9:54 am on Mar 31, 2009 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



    One thing. List the redirect before the rewrite here.

    abuzurah

    2:10 pm on Mar 31, 2009 (gmt 0)

    10+ Year Member




    One thing. List the redirect before the rewrite here.

    I have than 2000 url. any idea?

    g1smd

    11:17 pm on Mar 31, 2009 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



    The code above has a rewrite and a redirect, with the redirect listed last.

    Correct operation occurs with the redirect listed first.