Linking outside Wordpress page on localserver - wordpress

I've updated my website to a Wordpress site.
But now i have a problem with my prestashop, that i still need to be running on the server/webhost.
On my old page i had the prestashop installation called 'shop' inside my old site folder - so the link would be mysite.com/shop = worked fine.
I have nice permalinks working on my site, taking up all directions outsite WP sites as 'No result WP page' - And im stocked here..
I dont know where to put my prestashop folder or how to link to it from Wordpress.

Have you set up the permailinks in Wordpress so your .htaccess looks like the following?;
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
The line RewriteCond %{REQUEST_FILENAME} !-d is telling the server not to include rewrites for directories which are in the root of the install, so anything within your shop directory shouldn't be processed through index.php.

Related

Setup WordPress as a sub folder in Magento 2 directory

I have Magento 2 and want to setup WordPress in a subfolder, so it will be accessed via magento2.url/blog
I know about Fishpig but for my situation, it will not work because WordPress site has a lot of custom post types which is not supported by FishPig integration by default.
Right now if I tried to access magento2.url/blog it shows a 404 error Magento 2 page.
I modified .htaccess in WordPress subfolder to this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
But it not helps and home page for WordPress still shows a 404 Magento 2 page. I think I need to modify .htaccess in Magento 2 but not really sure how.
The .htaccess is irrelevant when integrating WordPress into Magento. This file only applies when accessing WordPress directly (ie. for a WordPress Admin request).
Here are basic installation instructions:
Install WordPress in a sub-directory of Magento called wp.
If you use the pub directory to display Magento, either install WordPress at pub/wp or create a symlink at pub/wp to point to the actual wp folder.
Check the wp_options table for the home and siteurl values. The siteurl value should be the /wp URL and the home option should be your /blog URL
This is all you need to do to integrate WordPress at /blog.
The .htaccess file has no impact here, however you should change /blog/ to /wp/ in the .htaccess for WordPress. The correct value is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
# END WordPress
For a full installation guide, see this link.
For case if using Apache.
install Magento
install Wordpress to subfolder blog
add to .htaccess & pud/.htaccess following code
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
In folder pub create symbol link like
ln -s /var/html/blog /var/html/pub/blog
As answered on https://magento.stackexchange.com/a/53757 you should install WordPress outside the Magento directory.
Despite of that, in your case you must edit Magento .htaccess because WP can't be accessed wich explains the Magento 404 error.
RewriteRule ^/blog/(.*) /blog/$1 [QSA]

WordPress website is not able to access to URL since the modification of permalinks

I'm working on a Wordpress website and I was looking for having a permalink with the name of the publication of my articles. I selected on the permalink option "Name of the publication". Since this modification, I'm not able to access to the different pages / articles on my website.
I know that problem can occur when we don't have the mod_rewrite loaded. I created an info.php and I saw in the list of the Loaded Modules "mod_rewrite". I also tried to modify the htaccess file and it still not working.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Do you have an idea?
Thank you
Create a backup of your .htaccess (.zip it) then, delete your .htaccess. After deleting, click save permalink.

htaccess WordPress and separate directory without filenames

On a site I'm working on the main portion of the site is wordpress powered.
I've added another directory completely separate from the wordpress site called employees and I'm having a little issue with the mod_rewrites for the new directory.
obviously wordpress uses this code to make its pretty urls
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>
# END WordPress
but I want to add this rule as well and any other necessary rules or conditions so that all of the /name.php files in the employees directory get redirected to just /name
RewriteRule ^employees/(.*)$ employees/$1.php [L,QSA]
The several things I've tried all just cause employees/main to 404 but employees/main.php resolves properly.

Setting up a another website on a wordpress folder

I am setting up a website inside a wordpress installation folder.
So it's like:
http://mysite.com/newsite/
Primarily, http://mysite.com is a wordpress installation, now I want to set up another site*(not a wordpress website)* on that directory which is newsite,
So basically it looks like this mysite/newsite/
When I go to that link, it changes the URL and leads me to a page of mysite page. I think maybe because of the .htaccess of the wordpress installation.
How can I access on my newly setup website without being redirecting me to http://mysite.com page?
PS:
Wordpress .htaccess configuration:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Your help will be appreciated!

How to install another cms in a sub-directory of Wordpress

I am trying to install shopping cart cms "x-cart" in a sub-directory "/store/" on my Wordpress site.
I have permalinks enabled and mod rewrite in htaccess... So when I try to access anything within "/store/" folder i am getting wordpress 404 :(
How do I exclude "/store/" folder in htaccess?
Here is my current one:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Thanks in advance!
If you have a folder called "store" you don't need to do anything. This line:
RewriteCond %{REQUEST_FILENAME} !-d
Is saying that "If the request is from a real directory (-d) ignore this index.php stuff and go with it". So, just create /store and put a "index.html" to see if it isn't an issue with x-cart instead of wp
If you are creating multi WP website, you can consider using WP multisites feature which can be found herecodex.
You might find it easier to either install x-cart on a sub-domain (store.yoursite.com), or just put it in a folder at the same level as wordpress yoursite.com/store.

Resources