2014-12-11, 20:48:15
Hi,
I have a question regarding the htaccess and 301 redirect.
Sorry but I’m completely new in this topic and just added the following codes from the get-simple wiki. http://get-simple.info/wiki/config:htaccess
My htaccess looks like this (my-website.de is just an example):
...
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.my-website-test\.de$
RewriteRule ^(.*)$ http://www.my-website-test.de/$1 [L,R=301]
# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([A-Za-z0-9-]+).html index.php?id=$1 [QSA,L]
Redirect 301 /landingpage1.html http://www.my-website-test.de/landingpage2.html
Unfortunately the 301 redirect looks like this
"http://www.my-website-test.de/landingpage1.html"
--> 301 redirect to
"http://www.my-website-test.de/landingpage2.html?id=landingpage1"
The website with the id ("http://www.my-website-test.de/landingpage2.html?id=landingpage1") does not work and I don’t really need the “id=” parameter.
I think the ID is added because of this part.
RewriteRule ([A-Za-z0-9-]+).html index.php?id=$1 [QSA,L]
I added this rewrite rule because I want to have websites with .html ending instead of php. (http://get-simple.info/wiki/config:htaccess)
How can I change the htaccess to redirect from
"http://www.my-website-test.de/landingpage1.html"
to
"http://www.my-website-test.de/landingpage2.html" (without ID)
I have a question regarding the htaccess and 301 redirect.
Sorry but I’m completely new in this topic and just added the following codes from the get-simple wiki. http://get-simple.info/wiki/config:htaccess
My htaccess looks like this (my-website.de is just an example):
...
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.my-website-test\.de$
RewriteRule ^(.*)$ http://www.my-website-test.de/$1 [L,R=301]
# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([A-Za-z0-9-]+).html index.php?id=$1 [QSA,L]
Redirect 301 /landingpage1.html http://www.my-website-test.de/landingpage2.html
Unfortunately the 301 redirect looks like this
"http://www.my-website-test.de/landingpage1.html"
--> 301 redirect to
"http://www.my-website-test.de/landingpage2.html?id=landingpage1"
The website with the id ("http://www.my-website-test.de/landingpage2.html?id=landingpage1") does not work and I don’t really need the “id=” parameter.
I think the ID is added because of this part.
RewriteRule ([A-Za-z0-9-]+).html index.php?id=$1 [QSA,L]
I added this rewrite rule because I want to have websites with .html ending instead of php. (http://get-simple.info/wiki/config:htaccess)
How can I change the htaccess to redirect from
"http://www.my-website-test.de/landingpage1.html"
to
"http://www.my-website-test.de/landingpage2.html" (without ID)