I have a running website and now i like to use WP for a couple of sub website/pages. So i am installing WP in subfolder, but now i am a bit clueless how to set up my index.html and .htaccess
I guess i need to make index.html to index.php so i can add
require('./wordpress/wp-blog-header.php');
but that would load WP and not my running website.
Any advice on how to be able to run these URI as WP pages
mydomain.com/example-1
mydomain.com/example-2
mydomain.com/wpwebsite
regards
You can install WordPress in your subfolder, maybe /wordpress/, then you can change the index.php in your /wordpress/ folder from:
require('./wp-blog-header.php');
to:
require('./wordpress/wp-blog-header.php');
move index.php and .htaccess from your /wordpress/ folder to your main folder, now you should be able to change the pages. The other pages you would like to add without WordPress:
Create .php / .html files and put it in the main folder, these should be available, if you call the url of the .php / .html file.
The best way is to use WordPress for all your pages.
Related
I run a Laravel based website and need to host a Wordpress blog on the same domain as http://example.com/blog
By placing the "blog" directory inside the public directory of the Laravel project, I get into an infinite redirect loop error.
How do I fix this?
Add this line into the .htaccess file inside your Laravel "public" folder and it should then exclude the /blog/ so you can have your own settings for it inside the blog folder.
RewriteCond $1 !^(blog)
While accessing my WordPress website, I got directory listing error. I can access the site using http://example.com/index.php but not when I use http://example.com. I also tried put the .htaccess file in the directory. I had following code in my .htaccess file.
#BEGIN WordPress
#END WordPress
DirectoryIndex index.php
I solved it... If any want to change your site path not having access to control panel in your db go to the wp-options table change your site url link to http://www.example.com to the http://www.example.com/index.php
I ran into a bit of a problem today. A client of mine had a Wordpress site build, she asked me to build a new static website (html5,css,js,no wp) but have a link to the old wordpress site containing a webshop she liked to keep.
So I wanted to put my new files in the same folder, but index.php was already doing something for the wordpress site. Being the front of the WP application.
I'm not that familiar with WP, so I can't really fiddle around with it too much myself. But all the URL's for the webshop seem to pass by this file (index.php). I also have another WP site, which is a blog, in another folder. This is how my file structure looks like.
public_html
-index.php
-/shop/ -->wordpress
-/blog/ -->wordpress
-newsite.php
-/img/
-/css/
-/js/
So on my newsite.php i have a link to the directory /blog/ , but since index.php is already part of the wordpress site, it catches the url and redirects to an error page of the old wordpress site, instead of just going in the directory.
What are my options here? I tried moving the shop and index.php into a folder together and referring to that folder on my newsite.php on the link for the shop, but it just gave an access denied error.
Thanks in advance
site's online at http://www.tutuchic.be/
i think You use a mod_rewrite rule to url redirect
Options +FollowSymLinks
Options -Multiviews
RewriteEngine On
RewriteBase /
RewriteRule ^indexs.php$ newsite.php/blog/ [R=301,L,NC]
I have wordpress installed in the root of my website public_html
Although I have other folder inside a projects folder running their own websites.
The .htaccess in the wordpress folder (parent-most folder) might be causing issues for the inside folders.
Is there a way, I can mention for a folder not to look any higher for htaccess files ?
DETAIL:
The two main issues I am currently having our
- if I set the status code to 500, I am get redirected to my home page (index.php)
- if a page is not found, it gets redirected to index.php
Thanks.
Put this code in your .htaccess under DOCUMENT_ROOT directory (just above your wordpress rewrite stuff):
RewriteRule ^subfolder(/.*|)$ - [L]
I have WordPress installed in a subdirectory and I'd like one WordPress page to appear as if it's on the root.
Eg.
/wordpress/mypage
To appear as:
/mypage
Assuming you're on Apache, and you've got permalinks already working, you can use an .htaccess file in your document root to rewrite yoursite.com/wordpress/mypage to yoursite.com/mypage.
If you don't already have a .htaccess file in your document root, create one and put this in:
RewriteEngine on
RewriteRule ^mypage$ wordpress/mypage
I'm no .htaccess expert, but that should do the trick.