All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Issue regarding hosting URL of wordpress website and redirection
Need help from htaccess experts and Wordpress gurus.
My problem:
My website is abc.com
Wordpress is installed in /wordpress folder
1) If anyone requests abc.com in the browser, it automatically forwards to 'abc.com/wordpress'. This is done using htaccess file and the website homepage opens normally. I would like to remove '/wordpress' from the address bar. Meaning the browser should display 'abc.com' only instead of 'abc.com/wordpress'.
How can we acheive this?
2) Also, for any internal links in the webiste, I would like to remove '/wordpress' in the browser path. So, if anyone requests 'Services' webpage which can be accessed from homepage, they should see:
'abc.com/services' instead of 'abc.com/wordpress/services' in the address bar.
At the moment, if someone requests 'Services' webpage from homepage, the browser directs to 'abc.com/wordpress/Services' but comes with an error:
This page isn’t working
abc.com redirected you too many times.
Try deleting your cookies.
ERR_TOO_MANY_REDIRECTS
However, after navigating to the address bar and removing 'wordpress' text from this i.e. just typing 'abc.com/Services', this comes back with the normal 'Services' page displayed normally.
Could someone please help me to resolve the above?
My current htaccess file looks like this:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?abc.com$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?abc.com$
RewriteRule ^(/)?$ wordpress/index.php [L]
Comments
Why not just install WordPress to abc.com instead of abc.com/WordPress. As for services, you can use a child theme and WordPress' inbuilt functionality to add a page for services.
what's your base_url in the wordpress setting?
if you put your site inside
/wordpress
, your base url also has to be the sameYou don't need a wordpress subdirectory. Just install in the root folder. Perhaps 'public_html' if cPanel.
I installed wordpress in /root but I don’t see anything on my website. Help!
I have a similar setup, my backend is one pub.example.com and the fronted is example.com. Simply change the WordPress address to your backend URL, ie pub.example.com and Site URL to example.com.
Changing the WordPress URL in the settings can do the trick, but leaving this scheme in production will result in many bugs in the future.