Wordpress changing URL when accessing links

Asked

Viewed 52 times

0

I have a domain www.dominio.com.br that points to my server and is redirected via .htaccess for the sub-folder www.dominio.com.br/novo through the following code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?dominio\.com\.br$
RewriteRule ^(.*)$ http://www.dominio.pro.br/novo/$1 [P]

What keeps the URL as www.dominio.com.br. Perfect, until I access some link on my page, because then the URL changes to www.dominio.com.br/novo/contato/, for example. The code in the file .htaccess in the sub-folder /novo is as follows:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /novo/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /novo/index.php [L]
</IfModule>

I believe that changing this code or some configuration in Wordpress I solve these problems, but after a few frustrating attempts, I did not succeed.

How to solve?

  • This is because inside the "new/" folder contains another rewrite rule, which is prioritized.

  • For others to understand better, this question is an extension of another question: http://answall.com/questions/52572/redirection-301-fora-do-dom%C3%Adnio-com-htaccess

  • And how do I change that rule so it doesn’t happen?

  • remove it from the subfolder..

  • I tried to take. Can’t find any more link.

  • not just remove it altogether... need to readjust the rule. Don’t expect me to do your job. rsrsrs I could simply write an answer but I won’t do it because I haven’t seen the effort on your part to do something

  • I do not want you to write an answer, but I do not expect you to answer a comment without at least passing a reference. We are not playing guessing here. You do not sleep with me to know the effort I have made so far to get what I have done so far.

  • I don’t need to sleep with you to know how hard you’ve worked. I measure that based on what you put here. You haven’t posted anything relevant so far, and that’s the image you’re looking at. If that’s not your image, then change your posture, post what you’ve been trying to do because here too I don’t have a crystal ball to guess what you’re doing and how hard you’re working.. Do not reverse the figures. Good luck.

  • I respect your opinion that the minimum of effort should be applied before leaving filling forums of questions and respect your knowhow as a developer, but be careful when judging the image of others. I may not have posted anything relevant to you, but if I helped 10 or 15 people with my questions, that’s fine with me. And if you think I haven’t tried, it’s because it’s easy when you know the answer and have the necessary theory, but I’m a chemist with a one-off need outside my comfort zone and no theoretical basis. The little I’ve done so far, for me, has taken hours of research.

  • Cassius, I suggest you avoid this kind of unnecessary discussion. You keep deflecting focus to continue "mouthing". The only one who is harmed is you. And answering one more of your posts, this is not a competition of who knows more or knows less and no matter how many points a site member has. That doesn’t mean anything. It’s not a knowledge level meter. Want to know the real thing? I also don’t know the solution to your problem but I know how to seek and find solutions.

Show 5 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.