This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

chris

  • **
  • 29 posts
htaccess redirection and url problem
« on: March 18, 2021, 08:58:44 AM »
Hi ! The new osclass version of my site is ready and i want to put some htaccess permanent redirections on my old (non osclass) site because URLs are not the same on osclass. Perfect, BUT, it leads to a little problem.

I put this line in my htaccess :

RedirectPermanent /pages/old-url https://my-new-osclass-site.com/new-url

problem :

Clicking on the URL on the former site does not bring me on https://my-new-osclass-site.com/new-url

as it should (and i want to)

It brings me on :


https://my-new-osclass-site.com/search/rewrite,1/category,new-url

(url is automaticly changed by the program) (not the same thing with my brother, it works normally)

An idea why ???

Not good for me, i really need to give the juice to the good url.

« Last Edit: March 18, 2021, 09:02:47 AM by chris »

*

MB Themes

Re: htaccess redirection and url problem
« Reply #1 on: March 18, 2021, 11:10:17 AM »
@chris
This could work:
Code: [Select]
RewriteEngine On
RewriteRule ^(.*)$ https://newdomain.com/ [R=301]
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

chris

  • **
  • 29 posts
Re: htaccess redirection and url problem
« Reply #2 on: March 18, 2021, 11:15:18 AM »
@MB

Thank you but i want to redirect page to page, not the hole old site on the homepage of the new, because old URLs have their own referencement in google that i want to keep

*

MB Themes

Re: htaccess redirection and url problem
« Reply #3 on: March 18, 2021, 01:20:48 PM »
@chris
Maybe this?
Code: [Select]
RewriteEngine On
RewriteRule ^(.*)$ https://www.newdomain.com/$1 [R=301,L]
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

chris

  • **
  • 29 posts
Re: htaccess redirection and url problem
« Reply #4 on: March 18, 2021, 03:39:07 PM »
no, but never mind, i ll put another htaccess on the destination site to re - redirect certain pages. Thank you

*

MB Themes

Re: htaccess redirection and url problem
« Reply #5 on: March 18, 2021, 03:43:23 PM »
@chris
You could at least add solution there ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

chris

  • **
  • 29 posts
Re: htaccess redirection and url problem
« Reply #6 on: March 19, 2021, 08:48:03 AM »
not sure it will help someone one day : my bad solution is to redirect once again on the new site the strange url generated by osclass in direction of the normal url genarated by osclass via this this kind of instruction in the htaccess :

RedirectPermanent /search/rewrite,1/cat,job https://my-new-osclass-site.com/job

but this does not works when we have a ? in the URL, .. of course - Si it would be better to find why it changes the URL



Marked as best answer by frosticek on April 01, 2021, 07:51:30 PM