Crystal-27
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: .htaccess file can't be replaced to change URLsIt all works great now, I’m not locked out of my CPanel,
and No I didn’t remove it.
.htaccess file is now:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^/about.html$ https://www.mydomain.com/about-us [L,R=301]
RewriteRule ^/work.html$ https://www.mydomain.com/our-work [L,R=301]
</IfModule>
# END WordPress
And to make the site’s URL https://www., I went into WordPress; Settings; General, and added the www to the WordPress URL and Site Address section!It works now!!!!!
??
Forum: Fixing WordPress
In reply to: .htaccess file can't be replaced to change URLsTo make the site’s URL https://www., go into WordPress; Settings; General, and add the www to the WordPress URL and Site Address section!
Forum: Fixing WordPress
In reply to: .htaccess file can't be replaced to change URLsNow I can’t log into my wp-Control Panel–yikes
Forum: Fixing WordPress
In reply to: .htaccess file can't be replaced to change URLsHi David:
OK, in my file I got rid of the
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPressAnd put in all the pages with:
RewriteRule ^about.html$ https://www.mydomain.com/about-us [L,R=301]
RewriteRule ^work.html$ https://www.mydomain.com/our-work [L,R=301]That didn’t work
I used the / before. That didn’t work.I realized it can’t run without the first code in there.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^(.*)$ https://www.mydomain.com/$1 [L,R=301]
RewriteRule ^/about.html$ https://www.mydomain.com/about-us [L,R=301]
RewriteRule ^/work.html$ https://www.mydomain.com/our-work [L,R=301]
</IfModule>
# END WordPressOk so the site is working, but if I type in www. after the https:// it reverts to https://mydomain.com?
Forum: Fixing WordPress
In reply to: .htaccess file can't be replaced to change URLsAm I replacing below with the above code you provided, or adding it like this?
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [L,R=301]
# END WordPressForum: Fixing WordPress
In reply to: .htaccess file can't be replaced to change URLsDavid thanks for your prompt response:
For every old and new page 301 redirect I add the above code?
redirectMatch 301^(.*)$ https://www.oldsite.com/index.html/
redirectMatch permanent ^(.*)$ https://www.newsite.com/redirectMatch 301^(.*)$ https://www.oldsite.com/about.html/
redirectMatch permanent ^(.*)$ https://www.newsite.com/about-us/redirectMatch 301^(.*)$ https://www.oldsite.com/site/programs.html
redirectMatch permanent ^(.*)$ https://www.newsite.com/programs/etc, etc……
Will I than delete the old .html files on the server?
Thanks