apache rewrite rule?
I have a url that looks like this:
https://domain.de/artikel/article.php?artikel=eintext
I would rather use the URL as
https://domain.de/artikel/eintext
in the browser so I have to rewrite it from https://domain.de/artikel/eintext to the old internal one I think, what then has to be put into my .htaccess to
to remove?
So if you have the URL https://domain.de/artikel/eintext internal to https://domain.de/artikel/article.php?artikel=eintext want to convert, you can do this with the following rules in your .htaccess file:
RewriteEngine On
# Rewriting of ‘https://domain.de/artikel/eintext‘https://domain.de/artikel/article.php?artikel=eintext‘
RewriteRule ^artikel/([^/]+)/?$ artikel/article.php?artikel=$1 [L,QSA]
switches on the transfer module.
With the rule
check URLs that start with “/artikel/” and then have any text that does not contain any other Slash (/).
With
start the text after “artikel/”. This value then becomes
used.
L means that no further rules are then checked.
Are you sure? there are no 404
The target should start with a slash: