• Home
  • Get help
  • Ask a question
Last post 46 min ago
Posts last week 141
Average response time last week 4 hours 42 min
All time posts 67779
All time tickets 10473
All time avg. posts per day 21

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#6970 – Batch Redirection of VM Product URLs

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Wednesday, 26 February 2020 14:33 UTC
dkaneloglou
  Finally about the URLs of the product I would like to do a general redirection:

/*/*/*/xxxxxx-detail.html

>

/xxxxxx-detail.html

Where xxxxxx the name of the product.

The categories and sub-categories (/*/*/*/) could be 1, 2, 3 or 4

You can do that by setting a alias. Read the details with full examples on this page of the documentation.. You don't need to care about how many sub-categories there are. You can just redirect /{*}/{*}-detail.html to /{*}-detail.html

I added the alias,
/{*}/{*}-detail.html to /{*}-detail.html
but strange things happen.
/axesouar-kouzinas/mpataries-kouzines/mpataria-kouzinas-gloria-simplex-13-5064-detail.html
should redirect to:
/mpataria-kouzinas-gloria-simplex-13-5064-detail.html
but redirects to:
/axesouar-kouzinas/mpataries-kouzines/mpataries-kouzinas-pagkou.html

/diafora/grammatokibotia/gramatothirida-viometal-torino-205-mpronze-detail.html
should redirect to:
/gramatothirida-viometal-torino-205-mpronze-detail.html
but redirects to
/stop-portas-dapedou-viometale-mpronze-detail.html

I have "301 redirect from non-sef to sef URL" and "301 redirect from JOOMLA SEF to sh404SEF"
set to NO, in order not to make any redirection depending on the URLs in database.
Is there another setting I am missing?
Wednesday, 26 February 2020 14:41 UTC
wb_weeblr
Hi

As you can see, the source and target URLs are unrelated (ie there is no -detail.html in the target).

So either

- your .htaccess file is doing the redirect
- another extension is doing the redirect (any other SEO extension or "canonical" extension?)

If you open the axesouar-kouzinas/mpataries-kouzines/mpataries-kouzinas-pagkou.html URL (not the alias, I mean the URL, in the SEF URL manager), does it have any alias under the ALiases tab?

Best regards

Yannick Gaultier
weeblr.com
@weeblr
 
Wednesday, 26 February 2020 15:26 UTC
dkaneloglou
There is nothing in the alias tab (alias-tab.jpg).
I do not use any other SEO extension. You can also check the backend.

The htaccess is the default joomla htaccess. Only added a redirection from non www to www in the custom redirection area, as you can see the code below:

##
# @package    Joomla
# @copyright  Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of mod_rewrite, but it may have already been set by your
# server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##

## No directory listings
<IfModule autoindex>
  IndexIgnore *
</IfModule>

## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
Wednesday, 26 February 2020 15:53 UTC
wb_weeblr
Hi

Still don't think sh404SEF really is involved: the redirects happens even if the aliases is deleted. Looking more.

Best regards

Yannick Gaultier
weeblr.com
@weeblr
 
Wednesday, 26 February 2020 16:02 UTC
wb_weeblr
Hi again

This was happening because you enabled Try to auto-redirect 404 error pages. After disabling that and the Joomla redirect plugin, that automatica redirect does not happen any more.

I then tested the redirect and fixed it that way:

from: {*}/{*}-detail.html
to: {*}-detail.html

The fields should not have a leading slash when talking about local redirects, at least the "from field".

Best regards

Yannick Gaultier
weeblr.com
@weeblr

 
Thursday, 27 February 2020 10:43 UTC
dkaneloglou
PERFECT!!!!
Thank you again, for resolving one more issue.
I think it´s all done now.
Thursday, 27 February 2020 12:49 UTC
wb_weeblr
HI

Happy to hear that! Closing this ticket now, feel free to open a new one as needed. If you do so, please mention this ticket number in the new one.

If you created any superadmin account for us, be sure to delete or block it now to avoid unnecessary risk in the future.

Best regards

Yannick Gaultier
weeblr.com
@weeblr
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.