× Here you can get community support related to ReDJ.

Redirect doesn't work outside the Joomla subfolder

More
10 years 2 months ago #2207 by drmad
Hello,

I would like to ask for help for how to configure the .htaccess to make URL redirection outside the Joomla folder. Thanks and below are the details.

Joomla folder www.mydomain.com/jfolder

URL redirection would like to create: www.mydomain.com/tnc
- I would like to have redirection to address : www.mydomain.com/jfolder/help/tnc
- "Request Only", "Decode URL" checked , correct?

I found whenever I enter a url outside the joomla folder /jfolder it just redirect to my joomla base direct, like this
TYPE: www.mydomain.com/tnc
GOTO: www.mydomain.com/jfolder
I WANT: www.mydomain.com/jfolder/help/tnc

I guess there something wrong with my .htaccess.

- jfolder/.htaccess (I use the Joomla default .htaccess)
#RewriteBase / (This is commented out)

- /.htaccess (Joomla default one with below customization)
RewriteCond %{HTTP_HOST} ^(www.)?mydomain.com$
RewriteCond %{REQUEST_URI} !^/jfolder/
RewriteRule ^(.*)$ /jfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?mydomain.com$
RewriteRule ^(/)?$ jfolder/index.php [L]
RewriteBase /
^^ Should I change it to "RewriteBase /jfolder" ?

Please advise and thanks a lot!

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

More
10 years 1 month ago #2214 by admin
Hi,
.htaccess seems ok. Firse rule just redirects any URL that doesn't start with /jfolder to the same URL adding /jfolder at the beginning. Second sets the home to /jfolder. Leave RewriteBase commented everywhere.

Now what about ReDJ rule. The URL:

www.mydomain.com/tnc

Should be redirected by .htaccess to:

www.mydomain.com/jfolder/tnc

If you need to move to:

www.mydomain.com/jfolder/help/tnc

Your rule should be:
From URL: ^/jfolder/tnc$
To URL: http://{siteurl}/jfolder/help/tnc
Request only: true (checked)

Kind regards,
Luigi

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

More
10 years 1 month ago #2215 by drmad
Hi Admin,

Thanks for quick reply.

I've done below steps and not sure if I left out anything as it seems not working.

1) Comment out the RewriteBase for both /.htaccess and /main/.htaccess , using a #
2) Setup and publish the rule:
From URL: ^/jfolder/tnc$
To URL: http://{siteurl}/help/tnc << I remove the /jfolder/ as the siteurl = www.mydomain.com/jfolder >>
Skip: (leave blank)
Redirect: 301
Case Sensitive: tick
Request Only: tick
Decode URL: tick

When I type www.mydomain.com/tnc , it goes to www.mydomain.com/jfolder/zh/

Not sure I've done something wrong? or because I am using Zoo as the frontpage / default page (this caused a lot problem) and ReDJ is the ONLY working extensions with Zoo (others, like Dynamic404, Qlue404 all not work!)? Or anything wrong with the .htaccess so the path cannot be passed to Joomla? FYI, I am using Falang (Joomfish like component for multilingual site).

p.s. The hits for the redirection = 0

Please advise.

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

More
10 years 1 month ago #2217 by admin
Hi,
to help you I need to test redirection by myself. Send me an email with the real full URL to call.

Kind regards,
Luigi

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

More
10 years 1 month ago #2222 by drmad
Thanks, where can I find your email address?

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

More
10 years 1 month ago #2224 by admin
Send me an email at info(at)selfget.com

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

Time to create page: 0.104 seconds