Skip to content

Add hostsToRewrite option and advanced-options page. - #809

Merged
leonstafford merged 2 commits into
elementor:developfrom
john-shaffer:hosts-to-rewrite-option
Sep 21, 2021
Merged

Add hostsToRewrite option and advanced-options page.#809
leonstafford merged 2 commits into
elementor:developfrom
john-shaffer:hosts-to-rewrite-option

Conversation

@john-shaffer

@john-shaffer john-shaffer commented Sep 19, 2021

Copy link
Copy Markdown
Contributor

Migrate host rewriting functionality from the advanced crawling addon, with improvements.

It's useful to rewrite hosts other than the one we are crawling. Often there are links which reference a development or staging URL that we want to replace. This can also be used to rewrite http://deployment-url.com to https://deployment-url.com.

The incidental change from str_replace to strtr may fix some of the reported bugs with the host rewriting.

Comment thread src/SimpleRewriter.php Outdated
@leonstafford

Copy link
Copy Markdown
Contributor

Looks good!

Could we adjust to allow not rewriting anything, for those cases where people are locally hosting on an identical hostname as their deployment one?

(+ minor naming suggestion)

@leonstafford leonstafford left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just the naming + Q whether we should allow skipping rewriting hostnames completely

@john-shaffer
john-shaffer marked this pull request as draft September 20, 2021 23:36
@john-shaffer
john-shaffer force-pushed the hosts-to-rewrite-option branch from 62ed042 to 65b6e5d Compare September 21, 2021 00:15
@john-shaffer
john-shaffer marked this pull request as ready for review September 21, 2021 00:16
@john-shaffer

Copy link
Copy Markdown
Contributor Author

Implemented

@leonstafford
leonstafford merged commit d915d37 into elementor:develop Sep 21, 2021
@john-shaffer
john-shaffer deleted the hosts-to-rewrite-option branch November 9, 2021 02:52
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

Successfully merging this pull request may close these issues.

2 participants