I have a wordpress site in a folder
/site1
That site is site1.com
I have another wordpress site (totally separate install) in a subfolder of that site
/site1/site2
That site is site2.com
Ideally I would like to be able to access this site by typing either of these two things...
site1.com/site2
or
site2.com
So far, that works. However, I can't do something that's really important.
I can't type, say
site2.com/forums and get to my forums. I get an internal server error. The only way to get to the forums is to go all the way back to site1.com/site2/forums
Can someone tell me what needs to change in my .htacces, wp-config, or wordpress dashboard to make this happen (and in what subfolder to make these changes?)
.htaccess for site1
# 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
<Files 403.shtml>
order allow,deny
allow from all
</Files>
.htaccess for site2
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /site2/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /site2/index.php [L]
</IfModule>
# END WordPress
As stated in the comments, both the wp url and site url are http://site1.com/site2 as doing anything else broke the sites.
Related
See below, the .htacess file from Wordpress. If I remove the part starting from # BEGIN WordPress, all the image file URLs will be changed to d28rt1vkpsdxas.cloudfront.net/someimage.png successfully.
However, all the internal links will be unable to access (only the home page can access). The error is
Not Found The requested URL /shop/ was not found on this server.
But if I keep the part start from # BEGIN WordPress, the CDN redirect will not work anymore. All photos are missing.
Options +FollowSymlinks
RewriteEngine on
Rewriterule ^wp-content/uploads/(.*)$ http://exampled28t1vkps.cloudfront.net/$1 [r=301,nc]
# 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
You’re missing the [L] flag, which prevents other rules from redirecting:
Rewriterule ^wp-content/uploads/(.*)$ http://exampled28t1vkps.cloudfront.net/$1 [r=301,nc,l]
I have already spent hours on this, and i don't make any progress. How can i mask or map my WordPress page into my sub-domain without re installing the whole WordPress files again? I have tried those multi-site plugins and it gave me a fresh copy of WordPress! I don't want that.
I have also tried the WPMU domain mapping plugin, but the subdomain outputs the homepage.
What i want is:
e.g i want my URL www.mysite.com/mypage to become mypage.mysite.com
Is this even possible? Also, I have already created a wildcard sub-domain in my cPanel.
NOTE* This will be only for 1 page only.
here's my current .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mypage\.domain\.com\.es$
RewriteRule ^(.*)$ http://domain.com.es/mypage/ [L,QSA]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
My site is set up with 2 CMS syatems
In the root domain there is a Joomla website and in another directory called /word/ there is a wordpress directory.
The site originally was the wordpress site and this was moved to /word/ directory but to maintain all the original url's, I used mod_rewrite which works great until I insert the mod_rewrite for the Joomla site.
The mod_rewrite works great for the Joomla site but blocks all access to /word/ directory and 404 errors are thrown up. And if I leave the Joomla code out of the .htaccess I am left with the trailing /index.php/page name.
I have in my .htaccess file (This stops access to the /word/directory)
# Begin Joomla
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /word/index.php [L]
</IfModule>
# END WordPress
How can these 2 live together?
Joomla comes with its own .htaccess template which should be in the root folder and called htaccess.txt. Usually, I would rename to .htaccess and then un-comment this line:
# RewriteBase /
to:
RewriteBase /
My suggest would be to replace your "Joomla" section with the one provided by Joomla and see if that does the trick.
I have import on my local webserver a backup of a website made using WordPress but I am finding some difficulties with PermaLink configuration
The main problem is that if I use the permalink setted as Article Name I can see the homepage but if I click on the articles links into the homepage (to see the article) I always obtain the following message error:
Not Found
The requested URL
/wordpress35/2012/10/11/se-milano-avesse-il-mare-anzi-no-la-montagna-di-campiglio/
was not found on this server.
If I instead I use the Default settings for permalink (http://localhost/wordpress35/?p=123) I have no problem and I can access to the articles in my website
I think that this is a .htaccess problem. Can you help me to create an .htaccess file that solve this problem?
My actual .htaccess file is:
# 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
I need to use the URL format described as: http://localhost/wordpress35/my-article-name
Did you try creating a the wordpress .htaccess for your needs?
# 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
This should work if you didn't specify any change in the website's URL.
(If the homepage is still http://localhost/wordpress35/ )
I have a postNuke site that I'm currently transferring to Wordpress and I would like the format of the old site not to be lost in the conversion. I've tried to play with it but I'm going nowhere fast!
The current site currently rewrites the URL to :
domain.com/Article1234.html
where 1234 is the internal id number of the article.
The ID in the old site is the same in the new site. The URL in the new wordpress site currently rewrites to a custom structure :
/%category%/%postname%
Here is what is in the .htaccess file:
# 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
What is needed to be done to redirect the old format to the new one? Change rewrite rule in htaccess? 301 redirect? wordpress plugin for rewriting?
If you don't have a lot of articles, you can use RedirectPermanent, but you have to write yourself the directives in your .htaccess file.
Or you can use .htaccess like this
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^Article([0-9]+)\.html$ /index.php?p=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
This will rewrite Article1234.html to index.php?p=1234, then wordpress will make a 301 redirection.
Be careful when modifying permalinks since .htaccess could be override, to avoid this you can place custom rewrite rules before # BEGIN WordPress.