Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have installed Wordpress in a subdirectory '/medical' and want the address to show up as not

The Wordpress Codex here : says to replace




but that line does not appear in the generated .htaccess file.

I've tried just inserting the line before the /ifmodule tag but it breaks the site...


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /medical/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /medical/index.php [L]
# END WordPress
share|improve this question
Do you have the wordpress url and site url set in Settings->General? Also, are you changing the require() in .htacceess, or index.php? It should be index.php, as stated in the link you posted. – mor7ifer Jan 29 '12 at 13:46

1 Answer 1

use ths constants for set the install and main domain of WP

define('WP_SITEURL', '');
define('WP_HOME', '');

i think the htaccess is fine:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]

the index.php in the root has only an require to the file of the install: require('./wordpress/wp-blog-header.php');

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.