Welcome Guest, Not a member yet? Register   Sign In
Add just one RewriteRule...
#1

[eluser]Unknown[/eluser]
Hi everybody,

I am trying to add a rewrite rule in my htaccess file to improve the accessibility of my google+ page.
I want to redirect a link (for example http://www.mysite.com/googlepage) to my new page (https://plus.google.com/number) without prevent the actual routing from working... in vain !

I tested first an absolute link through "routes.php" file, but it doesn't work. The good way seems to modify the .htaccess file, which looks like that :

Code:
SetEnv PHP_VER 5_TEST
SetEnv REGISTER_GLOBALS 0

AddType x-mapp-php5 .php .shtml .html .htm .txt
Options +FollowSymLinks

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

I tried something like "RewriteRule ^/googlepage$ https://plus.google.com/number [L,R=301]" or "RewriteRule ^http://www.mysite.com/googlepage$ https://plus.google.com/number [L,R=301]", after RewriteBase or current RewriteRule, without positive consequence.

Someone could help me ?
#2

[eluser]Aken[/eluser]
Adjust accordingly.

Code:
Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html




Theme © iAndrew 2016 - Forum software by © MyBB