views:

111

answers:

2

Hi, I'm migrating my web from Joomla to Wordpress, in order to do so I need to set up access to a new subfolder to install wp. I have a htaccess file redirecting actual Joomla app to subdirectory /joomla/ I need access to /wp/ to set up and test before deleting /joomla/ directory. actual htaccess:

    <Files php.ini>
order allow,deny
deny from all
</Files>
rewritecond %{http_host} ^myweb.info
rewriterule ^(.*)$ http://www.myweb.info/$1 [r=301,nc]
Options FollowSymLinks
RewriteEngine On
# www.myweb.info joomla hack
# Add missing trailing slashes.
RewriteCond %{HTTP_HOST} ^(www\.)?www.myweb\.info$ [NC]
RewriteCond %{DOCUMENT_ROOT}/joomla%{REQUEST_URI}/ -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
# Domain to sub directory.
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(www\.)?www.myweb\.info$ [NC]
RewriteRule ^(.*)$ /joomla/$1 [QSA,L]
#No Directory Listing and Browsing
IndexIgnore */*
Options All -Indexes
# End deny directory listing

Guess I have to remove or change IndexIgnore but also allow /wp/ access, may you give me a hand on this?

Hosting at goddady virtual server linux

A: 

This will ignore your /wp/ subdirectory on the server. That way you can install Wordpress in that directory, test, and deploy without killing your Joomla install.

 RewriteRule ^wp/.*$ - [PT]
TALLBOY
Hey, thanks Tallboy
Virgilib
Just to be sure, ^wp/ equals whatever name has my wp direcoty, right?
Virgilib
Yes, that is correct. I saw that copying your htaccess file to the wp dir is working. Glad you got it functioning.
TALLBOY
A: 

Alter your one rule as follows:

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(www\.)?www.myweb\.info$ [NC]
RewriteCond $1 !^wp/
RewriteRule ^(.*)$ /joomla/$1 [QSA,L]
Gumbo
Thanks Gumbo, I'll try but so far copying the htaccess to the wp directory is working.
Virgilib