Combining wordpress and static html - wordpress

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]

Related

Elgg with within subdirectory that is not executed by elgg

I have website that run elgg in root directory.
But I want into subdirectory that is located within elgg put wordpress site.
Example:
www.mysite.com - elgg,
www.mysite.com/wp - wordpress
Yes, and I don't need any kind of integration between them (no bridge)
Just to elgg not to execute this folder
So I need for directory www.mysite.com/wp different rules than for rest site.
I tried changing .htaccess file for www.mysite.com/wp directory, but I think it's wrong way.
It is working only for simple .php files, but wordpress is more complex and after long period of loading It show elgg "nothing found" site loaded.
Please don't ask change site structure, it is already set. And wordpress in subdirectory also has it's reasons.
I know there must be easy solution for this issue like elgg plugin for subdirectories, but problem is that web is flooded with topics about installing elgg in subdirectory and I can't find solution.
You can use a rewrite rule that uses ^$ to represent the root and rewrite that to your /wp directory, and write this just above index.php like this:
RewriteEngine On
RewriteRule ^wp(.*)$ /wp [L]
RewriteRule ^(.*)$ index.php?__elgg_uri=$1 [QSA,L]

Wordpress Install with other software installed in a subdirectory

I'm having an issue that I think can be solved with .htaccess, however, I'm not sure exactly how, htaccess rules have never been a strong point for me.
I have a domain with WHMCS installed on it, in a subdirectory, like this:
/websites/manage/
the /websites/ directory is otherwise empty.
Now, I have installed WordPress on the root of the domain, and I want to use the /websites/ location in the WordPress permalink structure, as I want to build a WordPress page that describes the products and services available there, and use it as a gateway to the WHMCS portal located beneath it.
I've tried searching for an answer to this problem, but I keep turning up tons of results about installing wordpress in a subdirectory, and nothing else.
Thanks for your help.
EDIT:
I should have mentioned:
Currently, I get the WHMCS portal when I go to /websites/manage/, which is fine.
However, my problem is that when I go /websites/ I get a directory listing instead of my WordPress page.
I solved this by adding the following to the beginning .htaccess file, before the WordPress section:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/websites/$
RewriteRule . /index.php
</IfModule>
This redirects the /websites/ directory to the /index.php file which WordPress can then use to find its matching page. It still allows the sub directory /websites/manage/ to be controlled by the WHMCS software residing there.

Running Wordpress in a subdirectory (not the root)

I have a wordpress site that is currently running in a subdirectory of my website, basically put my structure is as follows:
root/wp
I'd like to keep the wordpress wp folder in the same place however have it load the wordpress site directly from the root url.
For instance currently the site loads when I go to www.mysite.com/wp however I'd like to have the wordpress site load when I simply go to www.mysite.com - currently if I go to www.mysite.com it simply loads an 500 Internal Server Error message.
I would expect I'd need to make some changes to the htaccess files - can anyone suggest how this would be done
So in a nutshell
When I go to www.mysite.com - it looks at the /wp folder but still appears as www.mysite.com in the address bar.
Adding these lines to .htaccess should do the job (not tested, sorry, it may not be sufficient):
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteRule ^(/)?$ wp [L]
Update: You might wish to check https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory for a way to accomplish this that's closer to WordPress standards.

URL rewriting For WordPress - Integrating Non Wordpress site with wordpress

We are unable to change the url rewriting to integrate an exsiting directory site into my wordpress site.
WordPress is fixing everything to their url pattern.
How can I help my programmer? Can someone give an advise?
More details would be useful, but in all likelihood, add a do nothing and stop rule for your folder before the WP rules:
RewriteEngine On
RewriteBase /
RewriteRule ^folder - [L]
We integrate WordPress with Ruby-on-Rails on ICanLocalize.
This is done in the Apache config file. Use the Apache Alias command to indicate that a path comes from a different physical directory.
Then, the URLs that match that path will never go to WordPress. They will be served from the other physical directory, where you can place anything.
If you need to take a subdirectory out of the url-rewriting from wordpress, put an additional .htaccess file into that directory and switch the Rewrite-Engine off:
RewriteEngine Off
That directive overrides any settings of the wordpress .htaccess for that directory and it's subdirectories.
You find the longer version of my answer in a related question on wordpress answers with a slightly different .htaccess code.

How to run WordPress from other location on the same domain

Hi I have a domain running in WordPress,
the path to WordPress installation is /subdomain/mywordpress/ and I can access these in mywordpress.mysite.com, Now I wish to load the index page on my main domain, ie
When I goto mysite.com I want to load the Index page of the WordPress, I know if that possible, the links are always pointing to mywordpress.mysite.com, but that is what I need know. because I dont want to remove the mywordpress.mysite.com. I just need to display all posts on my main site, with same design(that is why I prefer to load the Index file of wordpress)
What about a simple mod_rewrite rule inside a .htaccess to redirect to mywordpress.mysite.com?
This should work:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule . /subdomain/mywordpress/index.php [L]
You should look at this article in the Codex: Giving WordPress Its Own Directory. It addresses exactly the situation you are describing.

Resources