I use wordpress.When i upload to server it alway redirect to www.ex.com/www.ex.com/wordpress.
The right url is www.ex.com/wordpress.
But in my localhost it is OK. it can be with localhost/wordpress.
And it can go to url www.ex.com/wordpress/wp-admin. But it can not go to www.ex.com/wordpress.
Thank you.
Add below two lines on top of your theme's function.php
update_option('siteurl','http://www.ex.com/wordpress');
update_option('home','http://www.ex.com/wordpress');
Go to Settings>General and make sure your wordpress urls are correct. Also make sure you do not have any redirect Plugins. Also if you have any custom code of you then the wordpress won't change the urls from localhost to the correct urls, you need to do it manually. Furthermore, make sure your urls are like http://www.yourlink.com and not like yourlink.com
Related
I am trying to redirect everything on the my website. The currently site uses www.abc15421.com/year/month/date/abc-post in the URL. i want to remove year/month/date from url and url looks like www.abc15421.com/abc-post
I want to change permalink but if changed that then previous blog url not working so anyone have idea then help me
I am using redirection plugin but not getting proper way to resolved this. If anyone have idea then let me know.
You could use this plugin if you want to use Wordpress plugins, and follow those instructions to make things work
Guys, I've a site that was moved from sub.domain.com to domain.com. To do this I used Backupbuddy plugin in Wordpress. The problem is..Everytime any user try to access to some old page url (domain.com/testpage) and the page doesn't exist, are being redirected to sub.domain.com/testpage where the page previously existed.
Any idea how to fix this?
Thank you.
you have to make change in your .htaccess file in your server or host. always redirects are in that file. if you are using cpanel you have to make visible hidden items in settings.
I think the first port of call would be to check the URL in Wordpress matches the database table URL, if so update the Permalinks and retest.
Zip .htaccess to make a backup and remove the .htaccess file. Then, save your permalink again to generate a new .htaccess and check.
I recently changed the permalink structure from
https://www.domainName.ro/2018/04/10/post-name.html
to
https://www.domainName.ro/post-name.html,
using:
"RedirectMatch rule 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/([^/]+).html$ https://www.domainName.ro/$4.html" and works.
Now I want to redirect, within the same site (old URL), the URLs from
https://www.domainName.ro/2018/04/10/post-name/
to
https://www.domainName.ro/post-name.html
I tried different rules and did not work.
The two rules must work at the same time on the site
Can you help me?
Thank you very much!
You can manually change the url using wordpress plugin called redirection after install the plugin you can simply add url which you need to redirect from old to new just simple go to tools and there you find redirection click on that and you will find 2 box in 1box you need to enter old url which you need to redirect and 2box you need to enter new url where you need to redirect and click on save and you are done redirecting
Hope this will work for you
I'm changing my URL structure from domain.com/postname to domain.com/type/postname
What's the best way to redirect? I tried using the Redirection plugin, but it seems that I need to redirect each URL manually. Is there any way to redirect all the posts at once?
Go to the wp-admin's dashboard using domain.com/wp-admin. Then look for the Settings-->Permalinks option. From this page you can change the URL settings for all of your posts.
Here are some instructions on how to redirect your sites url.
Changing the site url
Back up your site first if you still can? When I changed to pretty permalinks I had to include a forward slash to custom field images.
from: wp-content/uploads/2012/08/tulip-813-01.jpg
to: /wp-content/uploads/2012/08/tulip-813-01.jpg
HOw can you make a custom menu that goes to the home page but the url is not static? Like I am in a test server right now, so the url is localhost/mywordpress. I put a '/' in the url for my custom menu but it redirects to localhost.
Is there a way to put it in a way it can goes to the homepage of my test server?
Thanks
Just use /wordpress/ and remember to change it back on the production server.
Better yet, use Apache VirtualHosts to map a fake domain to a document root. Check out my answer on setting up a VirtualHost.