This is my regular page code for a Redirect AMP page.
<meta name="original-source" content="https://www.themobilesapp.com/<?= $abc; ?>">
<link rel="canonical" href="https://www.themobilesapp.com/<?= $abc; ?>">
<link rel="amphtml" href="https://www.themobilesapp.com/ampspecification/<?= $abc; ?>">
The normal URL is
https://www.themobilesapp.com/Nokia-Lumia-638-specifications-3029
This works fine and the AMP page URL doesnโt work https://www.themobilesapp.com/ampspecification/Nokia-Lumia-638-specifications-3029
but this amplifier works fine when I add ampspecification.php and other transfer.
But when you visit the URL of the AMP page, it shows me this error below: -
Internal server error The server detected an internal error or incorrect configuration and your request could not be completed. please contact the server administrator at webmaster@themobilesapp.com. inform them about the time when this error occurred, and about the actions that you performed before this error. Additional information about this error may be available in the server error log. In addition, a 500 internal server error failed while trying to use ErrorDocument to process the request.
htaccess file with all codes
Options +FollowSymLinks -MultiViews -Indexes
<IfModule mod_rewrite.c>
DirectoryIndex index.php
RewriteCond %{HTTP_HOST} ^themobilesapp.com$ [NC]
RewriteRule (.*) https://www.themobilesapp.com/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
ErrorDocument 404 404error.php
RewriteRule ^([A-Za-z0-9-]+)$ specification.php?abc=$1 [L]
RewriteRule ^news/([A-Za-z0-9-]+)?$ news.php?abc=$1 [L]
RewriteRule ^ampnews/([A-Za-z0-9-]+)?$ ampnews.php?abc=$1 [L]
RewriteRule ^profile/([A-Za-z0-9-]+)?$ profile.php?id=$1 [L]
</IfModule>
source
share