Forum Moderators: phranque

Message Too Old, No Replies

What's wrong with this picture?

         

isvaljek

8:11 pm on Jun 16, 2011 (gmt 0)

10+ Year Member



#RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/component/) [OR]
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
## End - Joomla! core SEF Section.

RewriteRule (bazni-modeli.php) / [R=301,L]
RewriteRule (ca.php) / [R=301,L]
RewriteRule (cb.php) / [R=301,L]
RewriteRule (cc.php) / [R=301,L]
RewriteRule (combi-250.php) / [R=301,L]
RewriteRule (ekologija.php) / [R=301,L]
RewriteRule (istobal.php) / [R=301,L]
RewriteRule (iteco.php) / [R=301,L]
RewriteRule (kiehl.php) / [R=301,L]
RewriteRule (kontakt.php) / [R=301,L]
RewriteRule (model-4aa0300.php) / [R=301,L]
RewriteRule (model-4cv0600.php) / [R=301,L]
RewriteRule (modeli-sa-dva-portala.php) / [R=301,L]
RewriteRule (montazne-hale-istobal.php) / [R=301,L]
RewriteRule (napredni-modeli.php) / [R=301,L]
RewriteRule (o-nama.php) / [R=301,L]
RewriteRule (oprema-za-unutarnje-ciscenje-vozila.php) / [R=301,L]
RewriteRule (pj-range.php) / [R=301,L]
RewriteRule (pl-range.php) / [R=301,L]
RewriteRule (platni-terminal-istobal.php) / [R=301,L]
RewriteRule (pomagala-za-otresanje-tepiha-cjedilo-za-krpe.php) / [R=301,L]
RewriteRule (portalni-uredaji-za-pranje-vozila.php) / [R=301,L]
RewriteRule (profi-ce-3000.php) / [R=301,L]
RewriteRule (profi-cs-2000.php) / [R=301,L]
RewriteRule (referentna-lista-bih.php) / [R=301,L]
RewriteRule (referentna-lista-kamionski.php) / [R=301,L]
RewriteRule (referentna-lista-mobilni.php) / [R=301,L]
RewriteRule (referentna-lista-portalni.php) / [R=301,L]
RewriteRule (referentna-lista-samoposluzni.php) / [R=301,L]
RewriteRule (referentna-lista-tunelski.php) / [R=301,L]
RewriteRule (referentna-lista.php) / [R=301,L]
RewriteRule (samoposluzni-uredaji-za-pranje-vozila.php) / [R=301,L]
RewriteRule (tb.php) / [R=301,L]
RewriteRule (tc.php) / [R=301,L]
RewriteRule (tunelski-uredaji-za-pranje-vozila.php) / [R=301,L]
RewriteRule (uredaji-za-demineralizaciju-vode.php) / [R=301,L]
RewriteRule (uredaji-za-obradu-vode-istobal.php) / [R=301,L]
RewriteRule (uredaji-za-pranje-gospodarskih-vozila.php) / [R=301,L]
RewriteRule (uredaji-za-reciklazu-vode.php) / [R=301,L]
RewriteRule (washbar-203-kwpxt.php) / [R=301,L]
RewriteRule (washboy-212-krka.php) / [R=301,L]
RewriteRule (weidner.php) / [R=301,L]

g1smd

8:19 pm on Jun 16, 2011 (gmt 0)

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



List redirects before rewrites.

Add the domain name to the redirect target URL.

Escape literal periods in RegEx patterns.

The parentheses are not required.

Add ^start and end$ anchors where needed.

The Joomla SEF rewrite code is many years old. Get a newer version using the "htaccess.txt" file that comes with Joomla 1.5.23 or later.

lucy24

11:14 pm on Jun 16, 2011 (gmt 0)

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



Do they have to be separate statements? Or can you group them as

RewriteRule (ca|cb|cc)\.php / [R=301,L]

and so on?

g1smd

11:28 pm on Jun 16, 2011 (gmt 0)

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



You can group them and by doing so the code would also be quicker, but that is something that can be done after the major errors are fixed.

In the redirect, the target URL should include the protocol and domain name, not just "/".

isvaljek

5:56 am on Jun 17, 2011 (gmt 0)

10+ Year Member



@g1smd:
If I list redirects before the rewrites, the rewrites seem to null the effect of rewrites(I get 404 for old page urls).
Joomla SEF is from 1.6.3, haven't changed a thing?
Is this better?:
RewriteRule (bazni-modeli|ca|cb|cc)\.php [domain.com...] [R=301,L]

@lucy24:
I guess I can, thanks!

g1smd

8:16 am on Jun 17, 2011 (gmt 0)

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



Take a look at the "htaccess.txt" file that comes with 1.6.3 and use that. You need to manually copy it and rename to .htaccess in order to use it.

As well as updated code, it shows exactly where redirects should go.

Yes, the new example is much better. If lines get too long, use [OR] and then start a new line.