antony
antony

Reputation: 103

Wordpress: How to make working in an other path

I want to change the URL of my site from

domain.com/wordpress/post-name

in

domain.com/blog/post-name

I changed the "Site Address (URL)" in General Setting in "/blog"

than as written here http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

1 - I edited the htaccess in root...

RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$ RewriteRule ^(/)?$ blog [L]

2 - Created the folder "blog" copied htaccess from wordpress directory copied the index.php

changed in the index this part.... require( dirname( FILE ) . '/wp-blog-header.php' );

in this part: require( dirname( FILE ) . '/wordpress/wp-blog-header.php' );

3 -saved permalinks to update the htaccess (updated manually too)

THE PROBLEM

The redirection is ok. but there is a white page... my question is it's correct this part? require( dirname( FILE ) . '/wordpress/wp-blog-header.php' );

the folders are both in the root

/wordpress

/blog

or should be something like require( dirname( FILE ) . '../wordpress/wp-blog-header.php' ); ?

thank you for any help!

Upvotes: 0

Views: 130

Answers (1)

Magesh Vs
Magesh Vs

Reputation: 82

require( dirname( FILE ) will return the current directory.

So this require( dirname( FILE ) . '/wordpress/wp-blog-header.php' ); will return 'blog/wordpress/wp-blog-header.php'

Just use require('../wordpress/wp-blog-header.php');

Upvotes: 0

Related Questions