I recently installed the WordPress SEO plugin and the plugin requested that i changed my Permalink settings.
Now, i did this to get nicer looking links containing the postname instead of the post id.
When the change was made, i was meet by 404 Error on my frontpage.
My static page seems to work fine + the direct link(accessed via the backend) to my blogposts works as well.
But my frontpage just gives me a 404 instead of listing my posts.
Some info about my setup
My blog is placed inside a subdirectoy so its accessed like this:
www.myhomepage.com/blog/
However i also have a redirect that directs blog.myhomepage.com to www.myhomepage.com/blog/
I added this redirect in my htaccess file like this
RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog.myhomepage.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.blog.myhomepage.com$
RewriteRule ^/?$ "http://www.myhomepage.com/blog" [R=301,L]
I have just tryed to remove this line from my htaccess file and the site works if this is done, but i actually wanted this redirect.
How can i rectify it an make it work okay?
Im really hoping someone can be a bit smarter than me ๐
Default). Put the custom structure back if you had one.
If your site is on the main domain, e.g. http://www.yoursite.com, add this code to your .htaccess file:
Here’s how to have everything as blog.myhomepage.com:
dashboard, settings, general, there’s a site URL.
Change that to your blog.myhomepage.com.
you can then add a redirect, 301 to your /.htaccess file of http://www.myhomepage.com
for http://www.myhomepage.com/blog to 301 redirect to blog.myhomepage.com.
This will bounce any content from whatever.myhomepage.com/blog/* to the blog.myhomepage.com/samecontentlink.
in the /blog/.htaccess file:
You just need your default wordpress .htaccess here.
This will fix your issue, you must have the site domain url correct in dashboard, settings, general.
If you don’t want blog.myhomepage.com but instead want everything http://www.myhomepage.com/blog/:
If you want your subdomain to be ignored, you could simply remove it from the dns and then make sure your blog’s URL in Dashboard,settings,general is set to
http://www.mysite.com/blog/
and make sure the .htaccess file in /blog/ contains the base for the blog.