I want to re-do a website using Wordpress. Since I don't feel confident in developing it somewhere else then moving it to the server once completed, I've moved the actual website on a subdir, put a index.html file containing just a redirect on the root, then installed wordpress.
Plan is: visitors just calling the url will get index.html, so will be redirected to the old website in the subdir, while I should be able to call url+index.php to check the wp website in development (since html has priority over php).
Once website will be completed, I'll remove the index.html file performing the redirect and visitors should start viewing the new website.
Problem is: even when calling url/index.php I'm redirected as if I had not added the specific request to index.php file.
Any help?
Related
I have an installed WordPress website.
I'm working on the site, therefore, I want to show a constructor page for the internet user. I have created a page which called first.html and I change the .htaccess file like below
#Alternate default index page
DirectoryIndex first.html
Now when I enter my domain name on the browser I can see the first.html. This is working properly.
I'd like to see my changes by entering the domain and page name on the browser like
www.mydomain/index.php
or
www.mydomain/wp-content/themes/XXXTHEME/index.php
However, my theme pages don't work.
How can I achieve to do this?
Instead of making changes in .htaccess, I'd suggest you to use this plugin : https://wordpress.org/plugins/maintenance/
Simply name your html file "index.html"
Web servers most commonly parse the index.html file firstly (unless told otherwise) and if it is not found, it proceeds to index.php
This also allows you to simply change that ".html" part to ".php" to see the website you are working on, without installing plugins that clutter your database or making unnecessary changes to your .htaccess file.
I have a WordPress installation on my website. Now I need to create a landing page (not WordPress) and, at the same time, maintain the WordPress installation on the same folder and still being able to access it with a different URL (e.g. www.mysite.com/blog.php instead of www.mysite.com).
So, to sum up:
index.php should be changed to blog.php
In this way, I can add a landing page (index.html) to my website
When accessing the website I should see the landing page (index.html), but still be able to see WordPress at www.mysite.com/blog.php (so, maintaining also the old permalinks to the blog)
I guess I should be changing the .htaccess file and maybe the settings of the blog, but I'm not able to find anything on the web (probably, I don't know what to look for).
By default server show index.html file first. you should not create a blog.php page. if in a directory has two files index.html and index.php you will see index.html when you visit your site.
just create an index.html page it will automatically show at first.
and if it not works .. just backup your .htaccess and delete it until you are working on developing.
That's it.
I've got a WordPress page where the permalink is /foo.
I'm hoping to add a new HTML page (non-WP) at /foo/bar, but when I created that folder via FTP, obviously the original /foo page started showing an empty directory, instead of the old WP page.
Is there any way of combining the two, so the index of /foo is the WordPress page and the index of /foo/bar is a non-WP HTML page?
Many thanks!
The HTTP request first resolve the folder which you placed inside your WordPress installation. So there is no direct way to achieve this becuase your sub-folder name is same as the page URL.
You need to rename your folder-name/page permalink to make this happen.
Here is some suggestions,
WP Page and Subdirectory with same name
Page URL not working due to physical directory
Also please ask WordPress related question here: WordPress Stack Exchange
I'm busy building a Wordpress website for a client. I've developed the site off-line and would now like to upload it to the live server to show the client what I've done so far. I want to keep the "Under Construction" html page I've create as the default when browsing to the site but if you type in www.sitename.com/index.php I want the actual site to be displayed.
I don't want to use an "under construction" plugin as I don't want the user to have to enter any form of username or password to gain access to the site.
I have tried: DirectoryIndex index.htm but as soon as I browse to index.php it flips me back to the index.htm page.
I've had a look here:
Make index.html default, but allow index.php to be visited if typed in
but unless I'm missing it, there's no real conclusion.
My development machine runs Windows 8 with XAMPP.
Use this in your .htaccess file to redirect the user to index.html when he types the domain name, if he especially types index.php, he will be able to get on that page
RewriteRule ^$ index.html [R=301,L]
Recently I've been working to develop a multi-user Wordpress site with Wordpress 3.0 however at the moment we are iso.g one server to showcase preview static content in a subdirectory while multi WP is in the root directory.
My question however is how to keep the root directory hidden from the publc. Curntly I have a PHP index file handling he redirect howevwer as WP has its own index file I waned to ask about any possible alternatives.
Thanks very much for any assistance,
You're probably going to want to do it with an .htaccess file. However, Wordpress has one of those too, so rename the current .htaccess file to .htaccess.orig (or whatever you want... but don't delete it) and then create your new .htaccess file with your 301 redirect.
Then whenever you are done, just rename everything back to the way it was.