Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urls under main domain are redirected to yourls link #11

Open
ashokbugude opened this issue Jan 13, 2017 · 3 comments
Open

urls under main domain are redirected to yourls link #11

ashokbugude opened this issue Jan 13, 2017 · 3 comments

Comments

@ashokbugude
Copy link

ashokbugude commented Jan 13, 2017

I have website https://www.vgo.watch
I have installed url shortner in https://www.vgo.watch/url

I have followed all the steps and am able to get url shortner working with shortened link as https://www.vgo.watch/[shortLink]

However , when I open other pages like https://www.vgo.watch/blog or https://www.vgo.watch/terms I am getting redirected to https://www.vgo.watch/url . How do I prevent this redirection .

I have tried modifying the .htaccess file as below

`
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule terms - [L]
RewriteRule blog - [L]
RewriteRule wp-admin - [L]
RewriteRule wp-content - [L]
RewriteRule wp-includes - [L]
RewriteRule wp-login.php - [L]
RewriteRule buywatch - [L]
RewriteRule thank-you - [L]
RewriteRule fr - [L]
RewriteRule ^([0-9A-Za-z]+)/?$ https://vgo.watch/url/yourls-go.php?id=$1 [L]
RewriteRule ^([0-9A-Za-z]+)+/?$ https://vgo.watch/url/yourls-infos.php?id=$1 [L]
RewriteRule ^([0-9A-Za-z]+)+all/?$ https://vgo.watch/url/yourls-infos.php?id=$1&all=1 [L]
RewriteRule . /index.php [L]

`

Now Everything works fine, but google or facebook cannot index the the sub pages like https://www.vgo.watch/blog or https://www.vgo.watch/terms as they return 404 error due to the rules

RewriteRule terms - [L]
RewriteRule blog - [L]

Please help me in resolving the issue ?

@mclegoman
Copy link

I have a simular issue.

@drbeco
Copy link

drbeco commented Aug 28, 2022

Same issue here.

If I enter http://domain/en/home = wordpress works fine. But, if I enter just:
http://domain
it redirects to http://url.domain
It should instead, open the home page under wordpress responsibility.

A bit hard to get this .htaccess working to not conflict with wordpress.

I read this answer here, and mostly people are giving up.

https://stackoverflow.com/questions/36223685/how-can-wordpress-and-yourls-peacefully-coexist-at-the-root-level

I hope to find a solution

@drbeco
Copy link

drbeco commented Aug 28, 2022

I finally solved the problem with YOURLS swap plugin and Wordpress. Here is the solution:

https://stackoverflow.com/questions/36223685/how-can-wordpress-and-yourls-peacefully-coexist-at-the-root-level/73516195#73516195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants