Hello,
I have set some 301 redirects in the Htaccess file of my site, to redirect some old URLs to the new ones.
Here's an example of how it's written in the file :
But if I visit that "john-doe" URL :
(which doesn't exist anymore)
It sends me to the right page set in the 301 rule, but it adds :
to the URL.
So the URL I'm being redirected to becomes :
Which gives me a 404 Not found error. But if I delete that "/?fname=john-doe" part, the url loads just fine.
Any ideas why this is happening?
I haven't edited anything in the htaccess file except adding few 301 redirects lines, formatted exactly how I have typed it earlier in the post.
I have added those lines after this block :
Before this line :
Any help will be gladly appreciated.
Thank you
I have set some 301 redirects in the Htaccess file of my site, to redirect some old URLs to the new ones.
Here's an example of how it's written in the file :
- Code: Select all
Redirect 301 /john-doe https://example.com/class/page-name.html
But if I visit that "john-doe" URL :
- Code: Select all
https://example.domain.com/john-doe
(which doesn't exist anymore)
It sends me to the right page set in the 301 rule, but it adds :
- Code: Select all
/?fname=john-doe
to the URL.
So the URL I'm being redirected to becomes :
- Code: Select all
https://example.com/class/page-name.html/?fname=john-doe
Which gives me a 404 Not found error. But if I delete that "/?fname=john-doe" part, the url loads just fine.
Any ideas why this is happening?
I haven't edited anything in the htaccess file except adding few 301 redirects lines, formatted exactly how I have typed it earlier in the post.
I have added those lines after this block :
- Code: Select all
#If your site begins with 'www', uncomment the following two lines
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Before this line :
- Code: Select all
#DO NOT EDIT BELOW THIS
Any help will be gladly appreciated.
Thank you