How can I rewrite a URL like this:
example.com/page.php?link=Anythingelse to example.com/Anythingelse and using
<h1><?php echo $link; ?></h1>
this with php in content:
example output: Website-Title: Anythingelse - Website-Title and Heading1 Anythingelse
First Idea is:
RewriteEngine On
# Redirect e.g. /page.php?link=value to /value if direct acccess
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{QUERY_STRING} ^link=([^&]+)$
RewriteRule ^/?page\.php$ /%1 [R=301,QSD,NE,L]
# Internal rewrite to from /value to /page.php?link=value
RewriteCond %{REQUEST_URI} !^/?page\.php$
RewriteRule ^/?([^/]+)$ /page.php?link=$1 [QSA,NE,L]
but it makes a 500 internal server error. My Provider doesnt support Apache error logs. What can i do? URL Routing with PHP?