Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-18-2008, 03:09 AM
WebProWorld Member
 

Join Date: Aug 2006
Posts: 85
imsickofwebpro RepRank -1
Default WordPress htaccess issues

Hi All,

I'm having issues with wordpress and .htaccess.

I have multiple subdomains under one server. Within each subdomain is a WordPress blog. To avoid canonicalization, I rewrite domain.com to www.domain.com. Unfortunately, wordpress only works as a folder extension of a highlevel domain. (eg.maindomain.com/subdomain/blog/)
I tried a few tricks mentioned on perishablepress.com and on WP.org, but to no avail.

I was hoping someone here with experience might have a quick solution.

Thanks in advance,
Scott

P.S. I would also like to access my wordpress blog via blog.subdomain.com if possible.
__________________
www.jacksonville-website-design.com
High-end Websites and Branding
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 04:06 AM
WebProWorld Pro
 

Join Date: Dec 2007
Location: Brussels, Belgium
Posts: 126
Jean-Luc RepRank 1
Default Re: WordPress htaccess issues

Quote:
Originally Posted by imsickofwebpro View Post
Unfortunately, wordpress only works as a folder extension of a highlevel domain. (eg.maindomain.com/subdomain/blog/)

(...)

P.S. I would also like to access my wordpress blog via blog.subdomain.com if possible.
First of all, create the subdomains. Most of the times, this is easy through the control panel of your host.

Then, within the WordPress control panel, define the canonical URL of each WordPress blog as being the subdomain.

Only when these steps are done, you can fine tune your .htaccess files.

Jean-Luc
__________________
Checking redirects is now as easy as 1 2 3, even if you are not a HTTP-header guru !
AWStats Support: installation assistance, add-on's, extra sections, dedicated forum,...
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 06:33 PM
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 310
imvain2 RepRank 0
Default Re: WordPress htaccess issues

Instead of directly accessing your htaccess file, you may want to use the wp_rewrite plugin. Because I have had problems in the past with wp "randomly" overwriting my htaccess file and screwing things up.

I should take my own advice, because I have just went into the WP code and changed their function around.
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 07:15 PM
tmaster's Avatar
WebProWorld Member
 

Join Date: May 2005
Location: Louisiana
Posts: 49
tmaster RepRank 0
Default Re: WordPress htaccess issues

I have several subdomains that work just fine with wp each one has its own subdirectory.
I dont understand why you are saying that WP only works as folder extension.

When I turn on a subdomain in my server that new domain points to the subdirectory of the same name and wp works just fine in it. Why are you fooling with .htaccess?
__________________
---
* SLMR v2.0 * Have many Nice days
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 07:29 PM
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 310
imvain2 RepRank 0
Default Re: WordPress htaccess issues

tmaster,

It could be his current host, some handle the folder structure for subdomains strangly. But it could also be his setup.
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 09:08 PM
WebProWorld Member
 

Join Date: Aug 2006
Posts: 85
imsickofwebpro RepRank -1
Default Re: WordPress htaccess issues

Thanks guys. I'll try a few of the suggestions and get back to this thread with my results.


Quote:
Originally Posted by tmaster View Post
I have several subdomains that work just fine with wp each one has its own subdirectory.
I dont understand why you are saying that WP only works as folder extension.

When I turn on a subdomain in my server that new domain points to the subdirectory of the same name and wp works just fine in it. Why are you fooling with .htaccess?
I pointed the new url to the subdomain after uploading the corresponding website and blog. I've tried moving a wordpress blog up a directory before and ran into the same issues. This particular website is on a netfirms account.
__________________
www.jacksonville-website-design.com
High-end Websites and Branding
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 10:59 PM
WebProWorld Member
 

Join Date: Aug 2006
Posts: 85
imsickofwebpro RepRank -1
Default Re: WordPress htaccess issues

Thanx guys! I reinstalled wordpress and added the following to .htaccess. Funny, when i tried this fix the first time, it didn't work. Marketing beats coding anyday!

Solution:

# disable the rewrite engine
RewriteEngine on


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
__________________
www.jacksonville-website-design.com
High-end Websites and Branding
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
WordPress.com versus WordPress.org --- at last some clarity! CCdeLF Graphics & Design Discussion Forum 1 01-16-2008 04:47 PM
.htaccess issues Sub Rosa IT Discussion Forum 1 07-06-2007 07:28 PM
Combining my .htaccess rewrites with WordPress rewrites mantawebsolutions Web Programming Discussion Forum 5 04-05-2007 03:46 AM
Wordpress as CMS Ariana Search Engine Optimization Forum 1 10-31-2006 01:06 PM


Search Engine Optimization by vBSEO 3.2.0