WordPress pages outside install directory - wordpress

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.

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]

Accessing folder inside WordPress installed website cpanel

I have website in which there is word press installed,now i just crated ftp account to certain directory say www.certainwebsite.com/username
now when i goto this link,it keeps me tracked back to www.certainwebsite.com isntead of goign to this link of www.certainwebsite.com/username .
Any suggestions?
i think that you need to change http:// to ftp://
If you are only serving static files out of that folder, try dropping an .htaccess file in the subdirectory that turns off the rewrite engine.
Create a text file called .htaccess in that directory with something like this in it.
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>

rewrite rule for files with pattern to go to subdirectory

I have files with this pattern :
(a[0-9]+\.htm)$
Considering file names a1180717200.htm or a1245862800.htm : normally they would be in root for the domain I am working with. Instead they have been moved to a new directory /archives so the files are now in :
thedomainiamworkingwith.com/archives/a1245862800.htm
I have tried a few things but I have no success. The root is occupied by a working wordpress site, with its normal .htaccess file set up. So I need to know what the redirect or RewriteRule would be, as well as how to put it in the .htaccess file without messing up the current wp install.
Are you trying to redirect your pages of this pattern to archives directory?
You can try something like this
RewriteRule ^(a[0-9]+.htm)$ thedomainiamworkingwith.com/archives/$1 [R=301,L]

Disable all parent htaccess

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]

rewrite problem : put magento inside drupal installation directory

I have put magento inside a drupal installation in a subdirectory called store.
When I access http://localhost/myshop/store magento home page is showed without problem but when i try to access any link inside magento (example http://localhost/myshop/store/admin) i get a drupal page that tells me that the page is not found !
What should I do to make all request under /store path be dispatched to magento insted of drupal ?
edit your .htaccess rewrite path to be /myshop
############################################
## you can put here your magento root folder
## path relative to web root
#RewriteBase /magento/
look for this in .htaccess and uncomment RewriteBase and change /magento/ to your directory name
In the .htaccess file for Drupal - that is, /myshop/.htaccess - add the following before the line with RewriteRule in it.
RewriteCond %{REQUEST_URI} !^/store/
This excludes your Magento directory from Drupal's rewriting and so allow Magento to continue as normal. You shouldn't need to change Magento's /myshop/store/.htaccess file for this.

Resources