× Here you can get community support related to ReDJ.

Add a 301 htaccess for a site in a subfolder ?

More
11 years 7 months ago - 11 years 7 months ago #972 by admin
Ok,
now is much clear :)

So, after all the steps you describe before, be sure to remove the base path in the redj plugin, you don't need it no more when site is on the root.

All your URLs will be like:

www.avocatshorsquebec.org/en/documents/ahq-newsletter

So, if someone calls the old URL:

www.avocatshorsquebec.org/site/en/documents/ahq-newsletter.html

This should be redirected to the first one. We should create a rule to drop the initial /site and the final .html. ReDJ can do, but I want to be sure, so I need to know the ReDJ version you are using. I ask you this because ReDJ for Joomla 1.5 can do this only with preg_match macro, but this is available only in the Enterprise version.

Kind regards,
Luigi
Last edit: 11 years 7 months ago by admin.

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

  • Chacapamac
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 7 months ago - 11 years 7 months ago #974 by Chacapamac
Replied by Chacapamac on topic Add a 301 htaccess for a site in a subfolder ?
This is a 1.5.26 site with version 1.5.6 Community RedJ


Should I keep the item published? - Don’t seem to make any difference??

from —> ^/site/

to —> http://{siteurl}/{pathltrim /site/}{queryfull}
Last edit: 11 years 7 months ago by Chacapamac.

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

More
11 years 7 months ago #975 by admin
This rule doesn't remove the .html at the end. If this is good for you, the rule works for both Community and Enterprise version.

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

  • Chacapamac
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 7 months ago #977 by Chacapamac
Replied by Chacapamac on topic Add a 301 htaccess for a site in a subfolder ?
No this is not good - It does absolutely nothing even if on... As I was saying I can remove the “site” in the url and easier if I move the site in the root and take it out of the “site” subfolder, I can easily take out the .html by switching the Joomla configuration settings “Add suffix”.

But I need to know how to redirect all the old —> www.avocatshorsquebec.org/site/whatever.html
To —> www.avocatshorsquebec.org/whatever

So far the rule I expose here did absolutely nothing before and after a revert somme settings.

(Site still in folder “site” for both tests

Test 1:
1— Put off Joomla Global config to take out .html
2— Root 301 redirect htaccess and Joomla htaccess and configuration.php that take out ”site” in URL’s
To —> www.avocatshorsquebec.org/whatever

Redj show rule On, no effect, no redirection

Test 2: (Revert to www.avocatshorsquebec.org/site/whatever.html
1— Put On Joomla Global config to take out .html
2— Root 301 redirect htaccess and Joomla htaccess and configuration.php that take keep ”site” in URL’s

Redj show rule On, no effect, no redirection

Both case Plugin is on and base path is “site” — Early redirect on

System RedJ is the third plugin to take effect — After JFrouter and JFdatabase (Joomfish plug in)


Now I received 404 for the time the site was the right way —> www.avocatshorsquebec.org/whatever

Little discourage — I have no problem taking the enterprise version if working...

Thanks to stay with me on this.

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

More
11 years 7 months ago #979 by admin
Here is the rule that works only with the Enterprise version:
From URL: ^/site/
To URL: http://{siteurl}{preg_match 1}/\/site\/(.*)\.html/{/preg_match}{queryfull}

I'm sending you the Enterprise version for Joomla 1.5, so you can test by yourself and decide if subscribe the Enterprise version.

Kind regards,
Luigi

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

  • Chacapamac
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 7 months ago - 11 years 7 months ago #980 by Chacapamac
Replied by Chacapamac on topic Add a 301 htaccess for a site in a subfolder ?
You can bet that I will pay for it. You where so helpfull...Thanks

More than that, if it work, be sure that I will go to the JED to praise your component (even if it will be on the 2.5 version)

And as I was saying, this will be part of all my next sites...

Also you can tell me what you will be doing, if it will be you site to really optimize all that?


QUESTIONS:

For this rule to work.
1— Do I have to move the site on the root (out of “site” folder?
2— Do I have to take out the base (folder) in my 301 htaccess (move to root or not) ?
- by the way are Redj bypassing or nullify my htacces because I have lot of security & optimisation features in there?
3— Do I have to take out the base (folder) in your plugin?
- and what about the early redirect?
4— Do I have to turn off the Global Joomla config for the .html suffix?

Can I install Enterprise over the basic?

Thanks
Last edit: 11 years 7 months ago by Chacapamac.

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

Time to create page: 0.160 seconds