Ich habe statische AMPhtml-Dateien gemacht, die ich später mit WordPress verbinden möchte.Wordpress .htaccess benutzerdefinierte HTML-Seiten umschreiben
Meine Struktur ist:
/amp/index.html
/amp/subpages.html
Ich habe jetzt soooo lange Zeit versucht, und es funktioniert nicht, wie Ich mag würde es funktioniert.
in .htaccess im Root-Verzeichnis Ich habe:
# BEGIN Static AMP
RewriteEngine On
RewriteRule ^index\.html$/[R,L,NC]
RewriteRule ^(.*)\.html$ /$1 [R,L]
# END Static AMP
# BEGIN Security
<files wp-config.php>
order allow,deny
deny from all
</files>
Options -Indexes
<files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</files>
# END Security
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
#-----------------------------------------------------------------#
# NOTE: #
# When testing your .htaccess do not use 301 redirects. #
# Use 302 until finished testing, as the browser will cache 301s. #
#-----------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# FLAGS: #
# [R] redirect, by default 302, can use [R=301] #
# [NC] flag causes the RewriteRule to be matched in a case-insensitive manner #
# [L] flag causes mod_rewrite to stop processing the rule set. #
#-----------------------------------------------------------------------------#
Was würde ich dies gerne tun
Umschreibenhttp://www.example.com/amp/index.html zu http://www.example.com/amp/
und
http://www.example.com/amp/subpages.html zu http://www.example.com/amp/subpages
Irgendwelche Vorschläge?