Skip to content

Commit

Permalink
move dpl_rewrite rule to dpl specific .htaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Apr 2, 2015
1 parent eab3a6f commit 05f2456
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .htaccess
Expand Up @@ -17,6 +17,3 @@ RewriteBase /
# previous stable releases (namely, std.container).

RewriteRule ^(phobos(-prerelease)?/std_container)_package\.html $1.html [R=301,L]
# rewrite any URL in dpl_rewrite_map
RewriteCond ${dpl_rewrite_map:%{REQUEST_URI}|NOT_FOUND} !NOT_FOUND
RewriteRule ^ ${dpl_rewrite_map:%{REQUEST_URI}} [R=301,L]
7 changes: 7 additions & 0 deletions dpl_prerelease_htaccess
@@ -0,0 +1,7 @@
# Enable mod_rewrite
RewriteEngine On
RewriteBase /library-prerelease/

# rewrite any URL in dpl_rewrite_map
RewriteCond ${dpl_rewrite_map:%{REQUEST_URI}|NOT_FOUND} !NOT_FOUND
RewriteRule ^ ${dpl_rewrite_map:%{REQUEST_URI}} [R=301,L]
7 changes: 7 additions & 0 deletions dpl_release_htaccess
@@ -0,0 +1,7 @@
# Enable mod_rewrite
RewriteEngine On
RewriteBase /library/

# rewrite any URL in dpl_rewrite_map
RewriteCond ${dpl_rewrite_map:%{REQUEST_URI}|NOT_FOUND} !NOT_FOUND
RewriteRule ^ ${dpl_rewrite_map:%{REQUEST_URI}} [R=301,L]
10 changes: 8 additions & 2 deletions posix.mak
Expand Up @@ -395,8 +395,8 @@ ${DOC_OUTPUT_DIR}/phobos-prerelease/index.verbatim : verbatim.ddoc \
# phobos and druntime, latest released build and current build (DDOX version)
################################################################################

apidocs-prerelease : ${DOC_OUTPUT_DIR}/library-prerelease/sitemap.xml
apidocs-release : ${DOC_OUTPUT_DIR}/library/sitemap.xml
apidocs-prerelease : ${DOC_OUTPUT_DIR}/library-prerelease/sitemap.xml ${DOC_OUTPUT_DIR}/library-prerelease/.htaccess
apidocs-release : ${DOC_OUTPUT_DIR}/library/sitemap.xml ${DOC_OUTPUT_DIR}/library/.htaccess
apidocs-serve : docs-prerelease.json
${DPL_DOCS} serve-html --std-macros=html.ddoc --std-macros=dlang.org.ddoc --std-macros=std.ddoc --std-macros=macros.ddoc --std-macros=std-ddox.ddoc \
--override-macros=std-ddox-override.ddoc --package-order=std \
Expand All @@ -414,6 +414,12 @@ ${DOC_OUTPUT_DIR}/library/sitemap.xml : docs.json
--override-macros=std-ddox-override.ddoc --package-order=std \
--git-target=v${LATEST} docs.json ${DOC_OUTPUT_DIR}/library

${DOC_OUTPUT_DIR}/library/.htaccess : dpl_release_htaccess
cp $< $@

${DOC_OUTPUT_DIR}/library-prerelease/.htaccess : dpl_prerelease_htaccess
cp $< $@

docs.json : ${DMD_REL} ${DRUNTIME_DIR}-${LATEST}/.cloned \
${PHOBOS_DIR}-${LATEST}/.cloned | dpl-docs
find ${DRUNTIME_DIR}-${LATEST}/src -name '*.d' | \
Expand Down

0 comments on commit 05f2456

Please sign in to comment.