I was just wondering, which files would I have to change to make Article Dashboard work when it is its own sub directory on my website, not the site root?
Answer by Article-Buzz:
For installation in a subdirectory you need to add a rewriteBase to the .htaccess
RewriteEngine On
RewriteBase /subdirectory
And add the subdirectory to your paths in setup.php
Code:
- Code: Select all
$base_path = "/home/user/public_html/subdirectory";
$base_url = "http://www.yourdomain.com/subdirectory";
$admin_path = "/home/user/public_html/subdirectory/admin";
$admin_url = "http://www.yourdomain.com/subdirectory/admin";
That should be all that is required.
Thank you so much article buzz! That fixed it right up. I did have to add one more thing though:
In your .htaccess, Instead of
- Code: Select all
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R,L]
put
- Code: Select all
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/subdirectory/$1 [R,L]
A new question to the above...
Hi
I have also installed in the subdirectory called /articles.
Full URL is http://www.sanchanworld.com/articles/ . Here i tried everything like adding RewriteBase and change in setup.php . but still i am getting the 500 internal server error.
my modified .htaccess is as follows.
- Code: Select all
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
php_flag session.use_trans_sid off
RewriteEngine on
RewriteBase /articles
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/articles/$1 [R,L]
RewriteRule ^profile\/([^\/]+)/([0-9]+) publicprofile.php?name=$1&id=$2
RewriteRule ^Category\/[^\/]+/([0-9]+) index.php?catid=$1&mode=category
RewriteRule ^Article/[^\/]+/([0-9]+)/?(.*) article.php?id=$1&act=$2
RewriteRule ^rss/[^\/]+/([0-9]+) rssarticle.php?id=$1
RewriteRule ^myarticles/(.*)$ index.php?mode=myarticles
RewriteRule ^(.*)topauthorslist/ topauthors.php?orderby=$1&ordertype=$2&namelike=$3&page=$4
RewriteRule ^(.*)popularlist/ populararticles.php?page=$2
RewriteRule ^(.*)searchresult/ indexser.php?page=$2
To make it run successfully, What else i can do
Added:
After going through this other information I found that we need to comment one line in .htaccess. ie,
php_flag session.use_trans_sid off
to
#php_flag session.use_trans_sid off
Now my articles site is running. But what was the use of this line. and what we lose or are there any issues if we run the site without this line?
Response: Putting a pound sign in front of the php flag comments it out in .htaccess If session.use_trans_sid is already off on your server setup, then it can simply be removed. If your server is running php5 it will have no effect or throw an error. It can be safely removed if not needed. htaccess cannot be used to control PHP5 settings on most server setups. It can work, but not on most shared environments. PHP5 must be run as an Apache module in order for such functionality to exist, but most upgraded servers run suexec or fastCGI. You would need to create a custom php.ini or contact your hosting support to see if any servers are running PHP5 as an Apache module. The easiest thing to do is delete it if you don't need it or turn on session.use_trans_sid off (if it is on) from a php.ini file.
I thought, like we use /* or // for commenting purpose in php in the same i assumed that # symbol indicates commenting. So what you suggest? Do i need to keep that line with # symbol or need to delete line itself?
Response:
The # instructs the server to ignore the line. Each line of comments requires it’s own #. (rather like php)
Examples:
# redirect section
# ban spammers by IP
Another thing you can do if you have a 'competing' .htaccess file in your root index (remember, .htaccess is recursive (meaning if you place the .htaccess file in your web root (the main folder of your web site) the directives and commands you place in the .htaccess file will have effect on all sub-folders) is add the below line to the ROOT .htaccess file...
RewriteRule ^articles/ - [L]
Where articles/ is the name of the directory that AD is installed in.