magento under wordpress as subdirectory not working - wordpress

I am using godaddy server.
I have wordpress as root directory and i have setup magento from local to server inside root as subdirectory.
Magento home page is working fine,but when i try to open any supage of magento then it opens "About us" page without CSS of root wordpress.
Thanks in advance.

Have you set the RewriteBase statement in Magento .htaccess ?
#RewriteBase /magento/
become
RewriteBase /subdirectory/

If your server is configured correctly you don't need to set RewriteBase, but make sure your base url is set correctly in backend as {server-root}/subdirectory/. If you cannot access admin, you'll need to change data in core_config_data by searching fields by url and setting the correct value by for example phpMyAdmin. Otherwise you'll need to do it by ssh + mysql command... or reinstall your Magento instance giving correct url to the installer.

Related

OpenLiteSpeed WordPress VPS 404 Error on Non-Wordpress Site Install in Sub Folder

I have an OpenLiteSpeed VPS WordPress install over at Vultr, and am trying to install a non-WordPress website into a sub-folder I created.
Ex.) https://example.com/test that is pointed to a new folder I created in the WordPress root install directory of /var/www/html/test
I created the directory and placed the files needed there that include an index.php file, however when I go to https://example.com/test, I receive a 404 Not Found error. I believe it has something to do with modifying the .htaccess file in the root of my WordPress install, but am unsure of what to modify 100%.
Any help is appreciated!
I tried modifying the Rewrite rules but am not confident in the options I chose. I since reverted the .htaccess file back to my default settings in which OpenLiteSpeed defines.
This can be closed out - I have it defined in my index.php file that resides in that folder point to a database I created in phpMyAdmin and I had the database field filled out incorrectly. Thank you to everyone who replied though. Oops!

Silverstripe install root folder public

I have installed silverstripe 4 into the /var/www/html folder in apache.
However, when I go to the url, I have to use "localhost/public/index.php" in order to obtain the main page. I thought I was to be able to just go to "localhost" to find the defaut page. What am I to do if I want to have a main page without people having to specify "/public/" before it?
Thanks.
Normally, your localhost website can be resolved without adding /public/ if the following 2 things are configured correctly.
Enable Apache mod_rewrite
Having .htaccess rewrite config in /var/www/html
Troubleshooting
Check if you got the right .htaccess in /var/www/html. Basically, this Apache config file will forward all the requests to /public/ folder.
If .htaccess is fine, make sure your mod_rewrite is enabled in your Apache. Check this link.

Using wordpress in a subdirectory

I use to have wordpress installed on the root of the website, but today I moved to a subdirectory "root/blog" with these steps:
1) Moved all the files>
2) Copied .htaccess and index.php do "root" and modify them
3) Change the wordpress URL on the settings.
It worked fine.
But I don't want it be accessed via www.mysite.com. I want to be access as www.mysite.com/blog. I want to do my own main index.
But if I remove the index.php from root, it gives me problems like /blog won't find my static first page.
What I'm missing?
You need to change your apache virtualhosts settings.
More infos here.

Single Wordpress site in subfolder/subfolder

I have a wordpress site that needs to work in a subdirectory : domain.com/dir/subdir/. It's a copy of a site that is in a single subdirectory – domain.com/subdirectory.
The database connection is working fine (content is there) but script urls etc are domain.com/wp-content and not the subdirectory.
Here's what I've tried:
- updating home and site url in options table
- different setups in .htaccess setting RewriteBase to /folder/subdir/ (gives me server error)
- setting site url manually in index.php
Any ideas how to solve this?

WAMP + directory alias + Drupal clean URLs

I have WAMP installed on my pc where I would like to run Drupal 6.
When I'm installing Drupal, I get the option to activate Clean URLs.
First I put my Drupal install in the www folder and I could choose to enable the clean URLs, but for backup reasons I moved it outside the www folder and created an alias the would point to the folder.
When I installed Drupal again, I couldn't choose to enable clean URLs anymore; the option was grayed out.
I would like to know why this happens; it seems some Apache module or PHP extension isn't available outside the www folder.
Just to be sure, I also tried an XAMPP install and created an alias with the some code lines as in the WAMP server but that worked, for some reason. The Apache version in WAMP isn't the same as the XAMPP install but I don't really think that is relevant.
I believe it's an config error in WAMP but I can't find out what.
Clean URLs doesn't work in the directory you copied Drupal because for that directory the directive AllowOverride is not set to All.
Drupal requires that every directives found in .htaccess files are enabled, in order to enable clean URLs; the directive AllowOverride, when set to All, allows to use all the directives that a .htaccess can contain.
The reason that in one case you can select the the option to enable the clean URLs, and in the other case is not selectable, is that Drupal, during its installation verifies the server is set to work with clean URLs, and change the form field to read-only if the server cannot support such feature.
To notice that the .htaccess file provided from Drupal can possibly need to be edited, in order to enable the clean URLs, as reported in the following comments, found inside the .htaccess file.
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /

Resources