rewrite-checker-presentation



rewrite-checker-presentation

0 0


rewrite-checker-presentation


On Github alxvallejo / rewrite-checker-presentation

Awesome Possum Rewrites

(Global edition)

Mulilingual | SEO | Testing

Demo launch

Maintain thy URL structure

Since multilingual functionality wasn't always around or easily available, many international site brands decided to maintain separate individual sites, each with their own ccTLD.

  • URL integrity. Important.
  • Slight SEO boost in regional areas.

Case by case basis.

Multilingual Multiplication

But what about unit testing?

  • Ideal for same-domain testing.
  • With curl, there's no boostrapping involved. You can just return the header and you have a large array of options to deal with various hurdles.
    • SSL certificate resolving
    • Login cookies
    • Setting the user agent
    • Setting the hostname

Who likes writing rewrites?

# When TLD is .de, .fr, or .nl
# And request URI does not begin with /de/, /fr/, /nl/
# And not an admin page
# And no PHP session cookie
# Redirect to https://www.imprivata.[TLD]/[TLD]/[REQUEST_URI]
RewriteCond %{HTTP_HOST} ^(.*\.)?imprivata.(de|fr|nl)$ [NC]
RewriteCond %{REQUEST_URI} !^/(de|fr|nl)/? [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/node/([0-9]+)/edit/?(.*)?$ [NC]
RewriteCond %{REQUEST_URI} !^/node/([0-9]+)/translate/?(.*)?$ [NC]
RewriteCond %{REQUEST_URI} !^/(uk|intl|de|nl|fr)/node/([0-9]+)/edit/?(.*)?$ [NC]
RewriteCond %{REQUEST_URI} !^/(uk|intl|de|nl|fr)/node/([0-9]+)/translate/?(.*)?$ [NC]
RewriteCond %{REQUEST_URI} !^/user/?(.*)? [NC]
RewriteCond %{REQUEST_URI} !^/admin/?(.*)? [NC]
RewriteCond %{REQUEST_URI} !^/index.php [NC]
RewriteCond %{REQUEST_URI} !^/field_collection/(.*)? [NC]
RewriteCond %{HTTP_COOKIE} !SSESS [NC]
RewriteRule ^(.*)$ https://www.imprivata.%2/%2%{REQUEST_URI} [R=301,L,NC]

Who likes testing rewrites

one hundred million times

VirtualHosts Hosts SSL Logins

Who has been < 100% sure their rewrites will work when they roll out their changes to production?

How it works

  • Set your vhosts.
  • Set all your test URLs.
  • Run a test.

Clients also like ...

  • Reports
  • Assurance
  • Testing!

Questions?

https://github.com/alxvallejo/htaccess_checker_drupal_7

Alex Vallejo @seojeek

Awesome Possum Rewrites (Global edition) Mulilingual | SEO | Testing Demo launch