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

Redirect Regex Bug #119

Closed
putyourlightson opened this issue Jul 14, 2018 · 1 comment
Closed

Redirect Regex Bug #119

putyourlightson opened this issue Jul 14, 2018 · 1 comment

Comments

@putyourlightson
Copy link

The following line unnecessarily replaces all occurrences of * with (.*), which means that the URI blog(.*) will be replaced with blog(.(.*)), which is obviously not the same thing.

return '#^' . str_replace(['*','/'], ['(.*)', '\/'], $uri) . '#';

Can it please be either fixed or removed? My suggestion would be simply:

return '#^' . str_replace('/', '\/', $uri) . '#';

SEO version: 3.3.0

@Tam
Copy link
Member

Tam commented Sep 6, 2018

Fixed in v3.4.0.

@Tam Tam closed this as completed Sep 6, 2018
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

1 participant