GetSimple Support Forum

Full Version: Redirect 301
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Google indexed my website with all the URLs like index.php?id=my-url

I'd like to do a redirect 301 via htaccess for example.

For example :

http://www.mydomaine.fr/index.php?id=hello-my-friend

should do a 301 redirect to 

http://www.mydomaine.fr/hello-my-friend.html

Can you help me please ?
Did you enable fancyurls and set your permalink to %parent%/%slug%.html already or something similar.
(2015-05-08, 00:12:02)shawn_a Wrote: [ -> ]Did you enable fancyurls and set your permalink to %parent%/%slug%.html already or something similar.

Yes i tried but nothing happened. And I don't think it do a 301 redirect. no ?

I tried to had this in the htaccess as well. But nothing works i don't understand


# 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]
No but working fancy urls will fix your original indexing problem.

You would have to add your own redirect rules in htaccess
I think you can enable

define('GSCANONICAL', 1);
in gsconfig

But I am not entirely sure.
(2015-05-08, 01:05:09)Yes it Words thanks ! :) shawn_a Wrote: [ -> ]No but working fancy urls will fix your original indexing problem.

You would have to add your own redirect rules in htaccess
I think you can enable

define('GSCANONICAL', 1);
in gsconfig

But I am not entirely sure.