permanent redirect on wordpress site - wordpress

I've got a web site based on wordpress, I need to temporarily hide the web site.
I thought about using a PHP 301 redirect. I tried to put at the begining of index.php and xmlrpc.php without success. How does wordpress file-structure works?
Tnx
Giuseppe

I've used this for redirects in the same purpose:
http://wordpress.org/extend/plugins/redirection/
I put the temporary html-file that I wanted to display in a folder which was placed in the same place as the main index.php file.

If you really need to hide a website under development, block search engines in Dashboard/Settings/Privacy and use something like WordPress › Absolute Privacy « WordPress Plugins to disable RSS feeds and redirect to a static page you choose.

Related

.htaccess reditrect subdirectory page to root

I got a website running and in the subdirectory domain.com/blog/ I installed a Wordpress blog website. The subdirectory contains dozen of blog articles, for example
domain .com/blog/testing
domain .com/blog/example
domain .com/blog/article1
domain .com/blog/article2
And what I am trying to do is to rewrite and redirect (a single page) domain.com/blog/example to domain.com/example
Any way to do this?
It seems javascript redirect is better than htaccess redirect for your case.
Simply edit your article using a code editor in wordpress.
<script>window.location = "http://www.yourhomepage.com";</script>

WordPress domain redirection

Beginner question:
I need to perform a 301 redirect from one Wordpress site (domain), to another Wordpress domain, like this:
From:
http://mycompany.com
To:
http://mycompany.se
A problem is that I have no FTP credentials for my From-site. I can't reach the .htaccess file.
Is there a plugin to use? I have studied the Redirection plugin, but this one seems working on pages within the same domain only(?)
I guess I need to be careful, because if some plugin edits the .htaccess file and something breaks, I can't reach the file...
Thankful for any help!
Whit Redirection Plugin you can redirect a url from old to new website.
You can create and manage redirects quickly and easily without needing Apache or Nginx knowledge. If your WordPress supports permalinks then you can use Redirection to redirect any URL.
There is full support for regular expressions so you can create redirect patterns to match any number of URLs.
The plugin can also be configured to monitor when post or page permalinks are changed and automatically create a redirect to the new URL.
You can easily find multiple plugins to perform 301 redirection in wordpress,but if you want to edit .htaccess you can install the plugin called "WP htaccess control" https://wordpress.org/plugins/wp-htaccess-control/ .
Through this plugin you can edit the .hraccess file from admin side.
Thanks.

Wordpress index.php redirect

I've just installed WordPress and I want to work on the theme. So I need to have an under construction page. I made an under.html file and addressed it in the .htaccess file as a default page.
But when I want to go to mydomain.com/index.php to see the WordPress main page and work on the theme, It redirects to mydomain.com again and shows me that under.html.
Any solution to have both under.html as the default page and the wordpress first page at the same time?
If you want to show an under construction page, you can simply use a plugin.
https://wordpress.org/plugins/wp-maintenance-mode/
Hope this will work for you.

Why might a Wordpress site have an /index.php/ rewrite rule?

I've just inherited a WP site to maintain, and every page on the site loads from
www.site.com/index.php/page
For what reason would a Wordpress site be set up like this? Can I possibly change this in the Dashboard, or would I need to modify htaccess?
Internally, all requests go through index.php. You can override this in the "Permalinks" section of your WP Admin Panel.

Wordpress landing.php page: access my plugin then redirect

I need to create a static php landing page (landing.php) for inbound advertiser links that that can access my wp plugin and then redirect to homepage.
Is it possible to access my plugin from a "regular" .php file? If so, how?
Or is there better way to do this within WP that doesn't load templates and just accesses my wp plugin and redirects to homepage?
Put this line at the top of your landing php:
require('/path/to/wp-load.php');
After that, you can use all WordPress functions, including your plugin.

Resources