Pierrick
Member
Posted 1 year ago #
Hi All,
I need to edit the .htaccess file but cannot find it when I am on the admin side of WordPress. I watched and read tutorials which all mention the manage > file but I cannot find that menu anywhere on the interface.
Can anyone shed some light on this?
I need to edit the .htaccess file (according to the SEO guy who carried out a SEO audit) so the blog http://www.keywordsandcocktails.com/blog would sit at the TLD (Top Level Domain) that is http://www.keywordsandcocktails.com/
Anyone has had to do such a thing? I would appreciate a bit of guidance on this as I am not sure how to go about this...!
Thank you
P
You can't edit .htaccess in the WordPress Dashboard as far as I know. You need to access your WordPress installation in an FTP client. When you are in the root of your WordPress installation in your FTP program, you need to go to the main menu of that program and select "Show hidden files" or "Show all files", depending on that program.
Pierrick
Member
Posted 1 year ago #
I found it. Thanks Chellycat. Have you got any idea about how I need to edit it to get the blog to sit at the TLD?
joneallen
Member
Posted 1 year ago #
You can use any Text Editor to edit the file.
Pierrick
Member
Posted 1 year ago #
Now that I can see what the .htacess file contains, here it is
RedirectMatch permanent ^/$ http://www.keywordsandcocktails.co.uk/blog
Do I just need to remove that redirect and the blog will sit on the TLD. Very wary to change anything on that file..!
Thanks
First, backup the file (save a copy on your local computer somewhere). That way if you mess it up, you'll have the back-up to fall back on.
Next, you can just comment out that existing line by putting a "#" in front of it. Then copy and paste this code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
Pierrick
Member
Posted 1 year ago #
Thanks. I shall try this and let you know thwe outcome
Pierrick
Member
Posted 1 year ago #
Hi,
I tried the above and it did not work. What I get when I typed in http://www.keywordsandcocktails.co.uk is a blank page with the message Holding page for 123-reg
Pierrick
Member
Posted 1 year ago #
I tried to do that manip and broke my blog! Maybe you can tell me where I went wrong?
My WordPress address (URL) is currently http://www.keywordsandcocktails.co.uk/blog
My blog address (URL) is currently
http://www.keywordsandcocktails.co.uk/blog
Am I right to think that i need to change the blog adddress URL to http://www.keywordsandcocktails.co.uk and then to move the folders (wp-content, wp-includes,...) to http://www.keywordsandcocktails.co.uk on the server
And then what?
Thanks for your help
P