Htaccess File

src/erikmaarten/devopera/master/.htaccess

# Note: The configurations provided by the Apache Server Configs project
# <https://github.com/h5bp/server-configs-apache/> are used on the server
# as `/var/www/conf/1-h5bp-server-config.conf`. Those settings are only
# loaded when Apache starts, not once for each request.
#
# This file, on the other hand, should only be used for Dev.Opera-specific
# settings (if any) and rewrite rules.

# Enable HSTS for `dev.opera.com` (no further subdomains).
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

# Use custom error documents.
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html

# Prevent `mod_rewrite` from prepending the full system file path to the
# resulting rewrite rule.
RewriteBase /
RewriteEngine On

# Redirect old feed URLs to the new location.
RewriteRule ^feeds feed/ [R=301,L]

# Keep supporting links to the old extension and theme docs URLs.
RewriteRule ^extension-docs/(.*)$ extensions/$1 [R=301,L]
RewriteRule ^addons/extensions extensions/ [R=301,L]
RewriteRule ^addons/themes articles/themes-in-opera-18-and-higher/ [R=301,L]

# Redirect old main nav URLs.
RewriteRule ^labs$ tags/labs/ [R=301,L]
RewriteRule ^web$ articles/ [R=301,L]
RewriteRule ^tools$ tags/dev-tools/ [R=301,L]
RewriteRule ^mobile$ tags/mobile/ [R=301,L]
RewriteRule ^addons$ extensions/ [R=301,L]

# Other redirects.
RewriteRule ^articles/mobile$ tags/mobile/ [R=301,L]
RewriteRule ^articles/svg$ tags/svg/ [R=301,L]
RewriteRule ^articles/javascript$ tags/javascript/ [R=301,L]
RewriteRule ^articles/html$ tags/html/ [R=301,L]
RewriteRule ^articles/extensions$ extensions/ [R=301,L]
RewriteRule ^articles/css$ tags/css/ [R=301,L]
RewriteRule ^articles/info$ / [R=301,L]
RewriteRule ^author/(.*)$ authors/$1 [R=301,L]
RewriteRule ^mini/?$ blog/opera-mini-server-upgrade/ [R=301,L]

# Rewrite rules generated by running `node _scripts/generate-rewrite-rules.js`; do not edit here.
RewriteRule ^articles/view/12-the-basics-of-html/?$ articles/html-basics/ [R=301,L]
RewriteRule ^articles/view/27-css-basics/?$ articles/css-basics/ [R=301,L]
RewriteRule ^articles/view/38-programming-the-real-basics/?$ articles/programming-the-real-basics/ [R=301,L]
RewriteRule ^articles/view/3d-games-with-canvas-and-raycasting-part/?$ articles/3d-games-with-canvas-and-raycasting-part-2/ [R=301,L]
RewriteRule ^articles/view/a-treat-for-nokia-n9-users-opera-mobile-labs-11-5/?$ articles/a-treat-for-nokia-n9-users-opera-mobile-labs-11.5/ [R=301,L]
RewriteRule ^articles/view/an-introduction-to-webgl/?$ articles/introduction-to-webgl-part-1/ [R=301,L]
RewriteRule ^articles/view/api-w3c-polozenia-urzadzenia/?$ articles/pl/w3c-device-orientation-api/ [R=301,L]
RewriteRule ^articles/view/beautiful-ui-styling-with-css3-text-shadow-box-shadow-and-border-radius/?$ articles/beautiful-ui-styling-with-css3/ [R=301,L]
RewriteRule ^articles/view/blob-sallad-canvas-tag-and-javascrip/?$ articles/blob-sallad-canvas-tag-and-javascript/ [R=301,L]
RewriteRule ^articles/view/building-a-web-mapping-application-with-pergola-and-polymaps/?$ articles/web-mapping-app-with-pergola-and-polymaps/ [R=301,L]
RewriteRule ^articles/view/can-kestrels-do-math-mathml-support-in/?$ blog/mathml-support-in-opera-kestrel/ [R=301,L]
RewriteRule ^articles/view/color-in-opera-10-hsl-rgb-and-alpha-transparency/?$ articles/hsl-rgb-and-alpha-transparency/ [R=301,L]
RewriteRule ^articles/view/creating-game-style-parallax-scrolling-zombie-edition/?$ articles/game-style-parallax-scrolling-zombie-edition/ [R=301,L]
RewriteRule ^articles/view/creating-pseudo-3d-games-with-html-5-can-1/?$ articles/3d-games-with-canvas-and-raycasting-part-1/ [R=301,L]
RewriteRule ^articles/view/css3-border-background-boxshadow/?$ articles/css3-borders-backgrounds-boxes/ [R=301,L]
RewriteRule ^articles/view/dom-access-control-using-cross-origin-resource-sharing/?$ articles/dom-access-control-using-cors/ [R=301,L]
RewriteRule ^articles/view/everything-you-need-to-know-about-html5-video-and-audio/?$ articles/everything-you-need-to-know-html5-video-audio/ [R=301,L]
RewriteRule ^articles/view/grid-design-basics-grids-for-web-page-l/?$ articles/grids-for-web-page-layouts/ [R=301,L]
RewriteRule ^articles/view/how-to-do-photoshop-like-effects-in-svg/?$ articles/photoshop-like-effects-in-svg/ [R=301,L]
RewriteRule ^articles/view/how-to-use-the-w3c-geolocation-api/?$ articles/w3c-geolocation-api/ [R=301,L]
RewriteRule ^articles/view/html-5-canvas-the-basics/?$ articles/html5-canvas-basics/ [R=301,L]
RewriteRule ^articles/view/introducing-mobile-browser-automation/?$ articles/mobile-browser-automation/ [R=301,L]
RewriteRule ^articles/view/introducing-the-html5-history-api/?$ articles/html5-history-api/ [R=301,L]
RewriteRule ^articles/view/introducing-web-sockets/?$ articles/web-sockets/ [R=301,L]
RewriteRule ^articles/view/introducing-woff-web-open-font-format/?$ articles/woff-web-open-font-format/ [R=301,L]
RewriteRule ^articles/view/introduction-to-hcard/?$ articles/introduction-to-hcard-part-1/ [R=301,L]
RewriteRule ^articles/view/introduction-to-hcard-part-two-styling/?$ articles/introduction-to-hcard-part-2-styling/ [R=301,L]
RewriteRule ^articles/view/love-your-devices-adaptive-web-design-with-media-queries-viewport-and-more/?$ articles/adaptive-web-design-with-media-queries/ [R=301,L]
RewriteRule ^articles/view/native-css-feature-detection-via-the-supports-rule/?$ articles/native-css-feature-detection/ [R=301,L]
RewriteRule ^articles/view/new-form-features-in-HTML5/?$ articles/new-form-features-in-html5/ [R=301,L]
RewriteRule ^articles/view/network-service-discovery-api-support-in-opera/?$ articles/network-service-discovery-api/ [R=301,L]
RewriteRule ^articles/view/opera-javascript-for-hackers-1/?$ articles/javascript-for-hackers/ [R=301,L]
RewriteRule ^articles/view/opera-mini-web-content-authoring-guidelines/?$ articles/opera-mini-content-authoring-guidelines/ [R=301,L]
RewriteRule ^articles/view/opera-mobile-emulator-experimental-webkit-prefix-support/?$ articles/opera-mobile-emulator-webkit-prefix-support/ [R=301,L]
RewriteRule ^articles/view/playing-with-html5-video-and-getusermedia-support/?$ articles/playing-with-html5-video-and-getusermedia/ [R=301,L]
RewriteRule ^articles/view/porting-3d-graphics-to-the-web-webgl-intro-part-2/?$ articles/introduction-to-webgl-part-2-porting-3d/ [R=301,L]
RewriteRule ^articles/view/raphael-a-javascript-api-for-svg/?$ articles/raphael-javascript-api-for-svg/ [R=301,L]
RewriteRule ^articles/view/raw-webgl-101-part-3-advanced-shader/?$ articles/raw-webgl-part-3-advanced-shader/ [R=301,L]
RewriteRule ^articles/view/raw-webgl-101-part-4-textures/?$ articles/raw-webgl-part-4-textures/ [R=301,L]
RewriteRule ^articles/view/raw-webgl-part1-getting-started/?$ articles/raw-webgl-part-1-getting-started/ [R=301,L]
RewriteRule ^articles/view/raw-webgl-part2-simple-shader/?$ articles/raw-webgl-part-2-simple-shader/ [R=301,L]
RewriteRule ^articles/view/responsive-web-design-a-project-management-perspective/?$ articles/responsive-design-project-management/ [R=301,L]
RewriteRule ^articles/view/responsive-web-development-with-wordpress-case-study/?$ articles/responsive-web-development-with-wordpress/ [R=301,L]
RewriteRule ^articles/view/robohydra-a-new-testing-tool-for-client-server-interactions/?$ articles/robohydra-testing-client-server-interactions/ [R=301,L]
RewriteRule ^articles/view/simple-html5-video-flash-fallback-custom-controls/?$ articles/html5-video-flash-fallback-custom-controls/ [R=301,L]
RewriteRule ^articles/view/svg-or-canvas-choosing-between-the-two/?$ articles/svg-or-canvas-choose/ [R=301,L]
RewriteRule ^articles/view/taking-your-web-apps-offline-web-storage-appcache-websql/?$ articles/offline-web-apps/ [R=301,L]
RewriteRule ^articles/view/the-freelancing-business-part-2-budgeti/?$ articles/the-freelancing-business-part-2-budget/ [R=301,L]
RewriteRule ^articles/view/the-freelancing-business-part-3-scheduling-your-projects/?$ articles/the-freelancing-business-part-3-scheduling/ [R=301,L]
RewriteRule ^articles/view/the-mobile-web-optimization-guide/?$ articles/mobile-web-optimization-guide/ [R=301,L]
RewriteRule ^articles/view/the-w3c-file-api/?$ articles/w3c-file-api/ [R=301,L]
RewriteRule ^articles/view/using-robohydra-as-a-mock-server/?$ articles/using-robohydra-as-mock-server/ [R=301,L]
RewriteRule ^articles/view/wordpress-goes-mobile-responsive-design-comes-to-cmses/?$ articles/wordpress-goes-mobile/ [R=301,L]
RewriteRule ^articles/view/64-bit-opera-and-out-of-process-plug-ins/?$ articles/64-bit-opera-and-out-of-process-plugins/ [R=301,L]
RewriteRule ^articles/view/an-introduction-to-css-regions/?$ articles/introduction-to-css-regions/ [R=301,L]
RewriteRule ^articles/view/an-introduction-to-datasets/?$ articles/introduction-to-datasets/ [R=301,L]
RewriteRule ^articles/view/extension-developer-interview-coffee-with-the-abine-team/?$ articles/extension-developer-interview-abine/ [R=301,L]
RewriteRule ^articles/view/opera-20/?$ blog/opera-20/ [R=301,L]
RewriteRule ^articles/view/a-call-for-video-on-the-web-opera-vid/?$ blog/a-call-for-video-on-the-web/ [R=301,L]
RewriteRule ^articles/view/labs-100-ragnarok-n-roll/?$ blog/100-ragnarok-n-roll/ [R=301,L]
RewriteRule ^articles/view/labs-a-call-for-video-on-the-web/?$ blog/a-call-for-video-on-the-web/ [R=301,L]
RewriteRule ^articles/view/labs-all-together-now-video-3d-file-access/?$ blog/all-together-now-video-3d-file-access/ [R=301,L]
RewriteRule ^articles/view/labs-beautiful-scalable-web-documents/?$ blog/beautiful-scalable-web-documents/ [R=301,L]
RewriteRule ^articles/view/labs-carakan/?$ articles/carakan/ [R=301,L]
RewriteRule ^articles/view/labs-debugging-svg/?$ blog/debugging-svg/ [R=301,L]
RewriteRule ^articles/view/labs-developers-gone-wild-opera-web-applications-team-starts-blog/?$ blog/developers-gone-wild-opera-web-apps-blog/ [R=301,L]
RewriteRule ^articles/view/labs-event-streaming-to-web-browsers/?$ blog/event-streaming-to-web-browsers/ [R=301,L]
RewriteRule ^articles/view/labs-find-me-geolocation-enabled-opera-build/?$ blog/find-me-geolocation-enabled-opera-build/ [R=301,L]
RewriteRule ^articles/view/labs-html-5-compliance-the-next-step/?$ blog/html5-compliance-the-next-step/ [R=301,L]
RewriteRule ^articles/view/labs-introducing-extended-validation-certificates/?$ blog/introducing-extended-validation-certificates/ [R=301,L]
RewriteRule ^articles/view/labs-introducing-opera-face-gestures/?$ blog/introducing-opera-face-gestures/ [R=301,L]
RewriteRule ^articles/view/labs-introducing-opera-fingertouch/?$ blog/introducing-opera-fingertouch/ [R=301,L]
RewriteRule ^articles/view/labs-introduction-to-web-applications/?$ blog/introduction-to-web-applications/ [R=301,L]
RewriteRule ^articles/view/labs-limited-opera-mini-3-0-beta/?$ blog/limited-opera-mini-3.0-beta/ [R=301,L]
RewriteRule ^articles/view/labs-making-the-future-based-on-html/?$ blog/making-the-future-based-on-html/ [R=301,L]
RewriteRule ^articles/view/labs-more-fun-using-the-web-with-getusermedia-and-native-pages/?$ blog/more-fun-getusermedia-native-pages/ [R=301,L]
RewriteRule ^articles/view/labs-opera-10-5-pre-alpha-for-labs/?$ blog/opera-10.5-pre-alpha-for-labs/ [R=301,L]
RewriteRule ^articles/view/labs-opera-11-alpha-adding-another-piece-to-the-puzzle/?$ blog/opera-11-alpha-another-puzzle-piece/ [R=301,L]
RewriteRule ^articles/view/labs-opera-9-beta/?$ blog/opera-9-beta/ [R=301,L]
RewriteRule ^articles/view/labs-opera-9-beta-2/?$ blog/opera-9-beta-2/ [R=301,L]
RewriteRule ^articles/view/labs-opera-9-technology-preview-2/?$ blog/opera-9-technology-preview-2/ [R=301,L]
RewriteRule ^articles/view/labs-opera-announces-specification-for-file-i-o-access-in-widgets/?$ blog/opera-announces-file-io-in-widgets/ [R=301,L]
RewriteRule ^articles/view/labs-opera-dragonfly-visual-refresh/?$ blog/opera-dragonfly-visual-refresh/ [R=301,L]
RewriteRule ^articles/view/labs-opera-kestrel-beta-2-is-now-available/?$ blog/opera-kestrel-beta-2/ [R=301,L]
RewriteRule ^articles/view/labs-opera-labs-opens-doors/?$ blog/opera-labs-opens-doors/ [R=301,L]
RewriteRule ^articles/view/labs-opera-mini-for-android/?$ blog/opera-mini-for-android/ [R=301,L]
RewriteRule ^articles/view/labs-opera-mobile-10-1-labs-release-for-maemo/?$ blog/opera-mobile-10.1-for-maemo/ [R=301,L]
RewriteRule ^articles/view/labs-opera-mobile-11-for-maemo-meego-and-windows/?$ blog/opera-mobile-11-for-maemo-meego-windows/ [R=301,L]
RewriteRule ^articles/view/labs-opera-mobile-11-meego-arm-developer-preview/?$ blog/opera-mobile-11-meego-arm-developer-preview/ [R=301,L]
RewriteRule ^articles/view/labs-opera-mobile-labs-11-5-for-meego-netbooks-and-tablets/?$ blog/opera-mobile-labs-11.5-meego-netbooks-tablets/ [R=301,L]
RewriteRule ^articles/view/labs-opera-turbo/?$ blog/opera-turbo/ [R=301,L]
RewriteRule ^articles/view/labs-opera-widgets-go-mobile/?$ blog/opera-widgets-go-mobile/ [R=301,L]
RewriteRule ^articles/view/labs-opera9-20-beta/?$ blog/opera-9.20-beta/ [R=301,L]
RewriteRule ^articles/view/labs-powered-by-opera-widgets-web-applications-takecenter-stage/?$ blog/opera-widgets-web-applications/ [R=301,L]
RewriteRule ^articles/view/labs-public-acid3-build/?$ blog/public-acid3-build/ [R=301,L]
RewriteRule ^articles/view/labs-taking-the-web-into-our-own-hands-one-computer-at-a-time/?$ blog/taking-the-web-into-our-own-hands/ [R=301,L]
RewriteRule ^articles/view/labs-technology-preview-gears-enabled-opera-mobile-9-5/?$ blog/gears-enabled-opera-mobile-9.5-preview/ [R=301,L]
RewriteRule ^articles/view/labs-the-opera-mobile-emulator-mobile-development-from-the-comfort-of-your-deskt/?$ blog/opera-mobile-emulator-for-desktop/ [R=301,L]
RewriteRule ^articles/view/labs-video-3d-canvas-and-file-i-o-repeat/?$ blog/video-3d-canvas-and-file-io-repeat/ [R=301,L]
RewriteRule ^articles/view/labs-we-re-back-opera-mobile-10-on-maemo/?$ blog/were-back-opera-mobile-10-on-maemo/ [R=301,L]
RewriteRule ^articles/view/labs-webgl-and-hardware-acceleration/?$ blog/webgl-and-hardware-acceleration/ [R=301,L]
RewriteRule ^articles/view/labs-welcome-webm-video/?$ blog/welcome-webm-video/ [R=301,L]
RewriteRule ^articles/view/labs-what-s-a-browser-security-issue-anyway/?$ blog/whats-a-browser-security-issue-anyway/ [R=301,L]
RewriteRule ^articles/view/labs-widget-runtime-wac-1-0-compliant-golden-for-android/?$ blog/widget-runtime-wac-1.0-golden-for-android/ [R=301,L]
RewriteRule ^articles/view/labs-widget-runtime-wac-1-0-supporting-beta-2-for-android/?$ blog/widget-runtime-wac-1.0-beta-2-for-android/ [R=301,L]
RewriteRule ^articles/view/labs-widgets-runtime-wac-1-0-supporting-alpha-for-android/?$ blog/widget-runtime-wac-1.0-alpha-for-android/ [R=301,L]
RewriteRule ^articles/view/labs-widgets-runtime-wac-1-0-supporting-beta-for-android/?$ blog/widget-runtime-wac-1.0-beta-for-android/ [R=301,L]
RewriteRule ^articles/view/web-notifications-in-opera-developer-24/?$ blog/web-notifications-in-opera-developer-25/ [R=301,L]
RewriteRule ^articles/view/building-applications-for-the-opera-tv-store/?$ tv/building-applications-for-the-opera-tv-store/ [R=301,L]
RewriteRule ^articles/view/creating-tv-store-icons-thumbnails-and-screenshots/?$ tv/tv-store-icons-thumbnails-and-screenshots/ [R=301,L]
RewriteRule ^articles/view/creating-web-content-for-tv/?$ tv/creating-web-content-for-tv/ [R=301,L]
RewriteRule ^articles/view/design-considerations-for-opera-tv-store-applications/?$ tv/design-considerations-for-opera-tv-store-applications/ [R=301,L]
RewriteRule ^articles/view/functional-key-handling-in-opera-device-sdk-based-tv-browsers/?$ tv/functional-keys-in-opera-tv-browsers/ [R=301,L]
RewriteRule ^articles/view/functional-key-handling-in-opera-tv-store-applications/?$ tv/functional-key-handling-in-opera-tv-store-applications/ [R=301,L]
RewriteRule ^articles/view/html5-audio-video-support-in-opera-tv-store-applications/?$ tv/html5-audio-video-in-opera-tv-store-apps/ [R=301,L]
RewriteRule ^articles/view/opera-for-devices-out-of-memory-system/?$ tv/opera-for-devices-out-of-memory-system/ [R=301,L]
RewriteRule ^articles/view/opera-tv-emulator/?$ tv/opera-tv-emulator/ [R=301,L]
RewriteRule ^articles/view/opera-tv-emulator-getting-started/?$ tv/opera-tv-emulator-getting-started/ [R=301,L]
RewriteRule ^articles/view/opera-tv-store-app-templates/?$ tv/opera-tv-store-app-templates/ [R=301,L]
RewriteRule ^articles/view/testing-your-app-inside-the-opera-tv-store/?$ tv/testing-your-app-inside-opera-tv-store/ [R=301,L]
RewriteRule ^articles/view/tweaking-spatial-navigation-for-tv-browsing/?$ tv/tweaking-spatial-navigation-for-tv-browsing/ [R=301,L]
# End generated rewrite rules.

RewriteRule ^blog/opera-19-released blog/opera-19/ [R=301,L]
RewriteRule ^articles/showmodaldialog blog/showmodaldialog/ [R=301,L]
RewriteRule ^blog/on-a-moratorium-on-new-browser-features articles/on-a-moratorium-on-new-browser-features/ [R=301,L]

# Redirect all `/articles/view/*` to `/articles/*`
RewriteRule ^articles/view/(.+)$ articles/$1 [R=301,L]
# Redirect all `/articles/tags/*` to `/tags/*`
RewriteRule ^articles/tags/(.+)$ tags/$1 [R=301,L]
Exit mobile version