Home Forum
2024-12-22
Benvenuto, Ospite
Nome Utente Password: Ricordami

undesired beavior?
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: undesired beavior?

undesired beavior? 14 Anni, 3 Mesi fa #1404

  • intensivex
Ive recently installed your free version of ReDJ redirect.

I'm having the following issues, perhaps you can point me in the right direction:

1) I'm redirecting old urls from a non-joomla install (to a new joomla integrated version of the site). The old URLs are not in a category tree, where the new URLs are in a category.

Example:

old url - /mypage/
new url - http://{host}/mycat/mypage.html

It work's sometimes, other times it doesn't, sending me into what seems an infinite loop and eventually a "Page not redirecting properly" browser error. Since this isnt really an Apache error, it doesnt get logged (?).

It seems, if the page or category in the old url doesn't exist, in some url or another on the joomla site, then the redirect works no problem.

Example:

old url - /PageWithNoRefernce/
new url - http://{host}/somecat/PageWithNoRefernce.html

works.

where,

old url - /SimiliarNametoExisting/
new url - http://{host}/somecat/SimiliarNametoExisting.html

Does NOT.

It also does not allow the existing joomla page to load at all (even when accessing from a menu item and not the redirecting page).

2) Joomla's default SEF behavior seems to accept URl's used without the suffix - IF you have a matching category of the same name.

Example:

I have a an old page named /pagenamedlikecat/

On the new joomla site, i have a category named /pagenamedlikecat/ and a page pagenamedlikecat.html

If i visit mydomain.com/pagenamedlikecat/
I get same result if id visit mydomain.com/pagenamedlikecat/pagenamedlikecat.html (without any redirect!)

Im trying to obviously tell the engines the new site hierarchy with some redirecting, but it seems there is some "flaw" by design in SEF and the rewrite, which doesn't allow me to use your ReDJ redirect properly in #2's case.

#1 is my main issue, so if you can provide me a path forward, that would be great. I am attaching my htaccess file if your curious.

Thank you for valuable time! if this works i will surely donate to your project.
L'Argomento è stato bloccato.

Re: undesired beavior? 14 Anni, 3 Mesi fa #1410

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi,
we will solve together...

Just send me a dump of ReDJ table (jos_redj) and I'll tell you if there's something wrong.

Regards,
Luigi

P.S. Sorry for duplicated messages. Forum is moderated, so I must approve posts.
Ultima modifica: 14 Anni, 3 Mesi fa Da admin.
L'Argomento è stato bloccato.

Re: undesired beavior? 14 Anni, 3 Mesi fa #1411

  • intensivex
I think i narrowed down the issue.

Joomla core SEF allows urls to display with or without the suffix. Even if you set "use suffix" to true in your global config, you can still visit the page using just a slash (/) instead of .html

Example:

yourdomain.com/page1.html

will produce same result as

yourdomain.com/page1/

My scenario makes this behavior undesirable. On the old site, the rewrite rules removed .html from any page, replacing them with a slash (/). Every page indexed or bookmarked by users of the old site use this url format (domain.com/page1/).

While most of their old bookmarks, and the engine listings will still work (due to this "flaw" in SEF), this isn't best practice and can lead to duplication of results IMO.

What I can consider a bug is, if a menu item alias is the same as an old page name, and if your lucky to get the redirect working, none of the pages under the menu item will work!

Example:

joomla menu item alias: somename

page under this menu: anothername

OLD page name: somename
(yourdomain.com/somename/)

Redirect 301 /somename/ yourdomain.com/somename.html
wont work!^

and if your luck enough to get it to work (say forcing it with an htaccess 301)

then this WONT work:

yourdomain.com/somename/anothername.html

... and anything that lives under menu item /somename/ will 404!

I tried an alternative route using a rewrite rule:

RewriteCond %{REQUEST_URI} !\.html$
RewriteRule ^(.*)$ /$1.html [R,L]

... but my syntax is a bit wrong i think because the resulting url is:

yourdomain.com/somename/.html

Not sure a new rewrite rule is best option, but it seemed like the easiest at the time.

Surely this behavior has been seen before?

<><>

My jos_redj table is currently blank (I removed the rules in my trouble shooting process and eventually disabled your plugin in place of manual 301's in htaccess, until I deem it will work for what i need).

<><>

A possible work around is setting "use page suffix" to False/No and manually entering the .html suffix with every menu item alias.

Surely there's a better way.

Please advise.
L'Argomento è stato bloccato.

Re: undesired beavior? 14 Anni, 3 Mesi fa #1412

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Ok,
I think to understand more or less...

About the rule it says: "If the URL doesn't have .html, then take all and add .html at the end".

The reason this don't work is because usually the URL ends with a / (maybe mod_alias do it). SO, try to change the rule as follow:

RewriteCond %{REQUEST_URI} /$
RewriteRule ^(.*)/$ /$1.html [R,L]

Regards,
Luigi
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.32 secondi
Cerca con Google
News
Chi è online
 138 visitatori online
Sponsor

slotmachineaamsonline.com è una guida alle migliori slot machine online legali in Italia. Sul sito trovi un elenco sempre aggiornato dei casino online con Slot machine e bonus slot, le ultime novità dal mondo delle slot online e le migliori strategie per vincere. Inoltre, è disponibile una sezione dedicata alle slot machine da BAR che finalmente sono disponibili nella versione online.