× Here you can get community support related to ReDJ.

Redirect don't work at all

  • pj@jordan.de
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 6 months ago #3165 by pj@jordan.de
Redirect don't work at all was created by pj@jordan.de
Dear all,
I installed ReDJ and did as you described.
Site is www.vital-office.info/joomla/web1
I direct several urls to this page and want for SEO a general redirect to www.vital-office.com
Before (on old pages) I used http like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.vital-office\.net$ [NC]
RewriteRule ^(.*) www.vital-office.net/$1 [L,R]
which worked perfectly.

Now on the new page I want more different redirects and installed your extension for this.
But now the most easy first redirect don't work at all.
I made 2 rules:
1. !^www\.vital-office\.net$ to www.vital-office.com/
2. ^/$ to www.vital-office.com
Nothing works
I also added the ErrorDocument 404
at the end of the standard .httaccess file from joomla

the .htaccess looks like:
##
# @package Joomla
# @copyright Copyright (C) 2005 - 2014 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 just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
##

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out 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 homepage
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

##
# Uncomment 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 request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# 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.
ErrorDocument 404 /

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago - 9 years 6 months ago #3167 by admin
Replied by admin on topic Redirect don't work at all
Ok,
summarizing we need to fix these two rules:

1. !^www\.vital-office\.net$ to www.vital-office.com/
2. ^/$ to www.vital-office.com

But first I need to ask you on which site/domain is ReDJ running? In your description there are:

vital-office.com
vital-office.info
vital-office.net

And this makes me a little bit confused... :)

Kind regards,
Luigi
Last edit: 9 years 6 months ago by admin.

Please Log in or Create an account to join the conversation.

  • pj@jordan.de
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 6 months ago #3169 by pj@jordan.de
Replied by pj@jordan.de on topic Redirect don't work at all
vital-office.com

Also many other domains are routed to the same location:
So without redirect you can also call e.g.
vital-office.de
vital-office.ch
vital-office.org
....

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #3173 by admin
Replied by admin on topic Redirect don't work at all
First rule to redirect ANY request to vital-office.net to the HOME of vital-office.com (literally):
From URL: http://www\.vital-office\.net
To URL: http://www.vital-office.com/
Request only: false (unchecked)

Second rule has no sense for me, please, describe me what you would like to do...

Please Log in or Create an account to join the conversation.

  • pj@jordan.de
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 6 months ago #3174 by pj@jordan.de
Replied by pj@jordan.de on topic Redirect don't work at all
??
Makes no sense. (If only possible to redirect from exactly defined url no need RedJ.)
The second rule ^/$ is according your documentation and should catch everything including a /.
That is what we need.
Why it don't work? Guess all other patterns also will not work like ^/de$ ^/en$ to redirect to language site.

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago - 9 years 6 months ago #3175 by admin
Replied by admin on topic Redirect don't work at all
I will try to be more clear,so you can decide if you need ReDJ or not...

2. ^/$ to www.vital-office.com


The ^/$ matches ONLY the homepage (I am assuming you have request only set to true, otherwise this will never match any requests). The destination is the HOME of vital-office.com. But the rule matches the HOME of vital-office.com too and this WILL CAUSE A REDIRECTION LOOP.

This is why I asked you to describe what you need, as example "I would like to redirect requests to the home of ANY domain and redirect to the home of vital-office.com", and I will tell you how to create the rule for this.

Hope this is much clear now...
Last edit: 9 years 6 months ago by admin.

Please Log in or Create an account to join the conversation.

Time to create page: 0.148 seconds