Hello. i am trying to find a solution to this problem for some days now. I have installed my wordpress blog in somedomain.com/blog for several months it was live with visitors and all that. a week ago i decided to direct all my visitors to the root so i configured wordpress to show all the posts in / instead of /blog and all my parmalink structure has changed accordingly. for example: mydomain.com/blog/somecategory/somepost is now:mydomain.com/somecategory/somepost but since i didn't want to lose all my outbound links that was published before the change and deal with alot of 404's i did a .htaccess redirect as follows: Redirect 301 /blog/ http://my domain.com/ so every link out there thats included the /blog prefix was now redirected to the /root. but now for the problem: since every address contains /blog is redirected to root, i cant login to my admin panel because it is located in the /blog folder. and every management directive in wordpress is in /blog folder. Please help me with that guys...
RewriteCond %{REQUEST_URI} !(wp-admin|wp-content|wp-includes) RewriteRule ^blog/ http://mydomain.com/? [R=301,L] Code (markup): Please rep if I was helpful Thanks.
Thanks for the help. unfortunately the code you provided did not remove the /blog prefix from the url. this is the code i used: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !(wp-admin|wp-content|wp-includes) RewriteRule ^blog/ http://emetaheret.org.il/? [R=301,L] Code (markup): i'm sure it's a misspelled error or something...
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !(wp-admin|wp-content|wp-includes) RewriteRule ^blog/(.*) http://mydomain.com/$1? [R=301,L] Code (markup):
still not working... When i use the url: http://emetaheret.org.il/blog Code (markup): The Htaccess code does not redirect me to: http://emetaheret.org.il Code (markup): this is the full .htaccess file for you to see. maybe something there is not right: # Permanent redirection # RedirectMatch 301 ^/blog/$ http://emetaheret.org.il/ # Redirect 301 /blog/ http://emetaheret.org.il/ RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !(wp-admin|wp-content|wp-includes) RewriteRule ^blog/(.*) http://emetaheret.org.il/$1? [R=301,L] # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Code (markup): for now, i restored the redirection command: RedirectMatch 301 ^/blog/$ http://emetaheret.org.il/ Code (markup): in order not to lose visitors.
Try adding a forward slash before blog/ RewriteRule ^/blog/(.*) http://emetaheret.org.il/$1? [R=301,L] Code (markup): Cheers
Still Doesn't work... The url: http://emetaheret.org.il/blog Code (markup): returns: http://emetaheret.org.il/blog/ Code (markup):
Sorry for the mess - but I can't post links apparently... Redirect 301 / httpyourwebsitehere You can also try making an index.php file in that directory, and putting this in it: <?php header( 'Location: httpyourwebsitehere' ) ; ?> Those should take you directly to whatever address you put in.
Hi. you can post links when you rap them in "code" tag... I allready tried the : Redirect 301 /blog/ http://my domain.com/ Code (markup): method but the problem was that it also redirected my admin address which has to be with the /blog prefix. Read my first Quastion...
Guys, i need help on redirect the url like http://www.madridbarca.com/profile.php?user=miccy to http://www.madridbarca.com/miccy/ , please help on how to do it, thanks!
And what are you basing that off of, Nivosh? A redirect doesn't affect your SEO - the engine just updates accordingly.