yabsoft
07-31-2007, 11:14 AM
By default, AIHS use PHP itself to implement static url without Mod_rewrite module. But this requires install PHP as module of apache.
If PHP is installed as CGI module,you will not view images by static url, such as http://yourdomain.com/out.php/filename.jpg.
If you can not edit php.ini to modify this,you can use mod_rewrite to make static url:
1.Find these lines in ".htaccess":
#RewriteRule ^show\.php/(.*)$ show2.php?img=$1 [L]
#RewriteRule ^out\.php/([a-z]{1})(.*)$ out2.php?$1=$2&%{QUERY_STRING} [L]
#RewriteRule ^view\.php/(.*)$ view2.php?img=$1 [L]
#RewriteRule ^image\.php/([a-z]{1})(.*)$ images2.php?$1=$2&%{QUERY_STRING} [L]Uncoment these lines:
RewriteRule ^show\.php/(.*)$ show2.php?img=$1 [L]
RewriteRule ^out\.php/([a-z]{1})(.*)$ out2.php?$1=$2&%{QUERY_STRING} [L]
RewriteRule ^view\.php/(.*)$ view2.php?img=$1 [L]
RewriteRule ^images\.php/([a-z]{1})(.*)$ images2.php?$1=$2&%{QUERY_STRING} [L]2.Rename these files to new filenames:
show.php->show2.php
out.php->out2.php
view.php->view2.php
image.php->image2.php3.Remember to enable static url from admin panel:
To enable static url,login in admin panel,browser to "Site>configuration>URL-Rewrite Setting",select 'yes' for "Enable Static Url for site?".
If PHP is installed as CGI module,you will not view images by static url, such as http://yourdomain.com/out.php/filename.jpg.
If you can not edit php.ini to modify this,you can use mod_rewrite to make static url:
1.Find these lines in ".htaccess":
#RewriteRule ^show\.php/(.*)$ show2.php?img=$1 [L]
#RewriteRule ^out\.php/([a-z]{1})(.*)$ out2.php?$1=$2&%{QUERY_STRING} [L]
#RewriteRule ^view\.php/(.*)$ view2.php?img=$1 [L]
#RewriteRule ^image\.php/([a-z]{1})(.*)$ images2.php?$1=$2&%{QUERY_STRING} [L]Uncoment these lines:
RewriteRule ^show\.php/(.*)$ show2.php?img=$1 [L]
RewriteRule ^out\.php/([a-z]{1})(.*)$ out2.php?$1=$2&%{QUERY_STRING} [L]
RewriteRule ^view\.php/(.*)$ view2.php?img=$1 [L]
RewriteRule ^images\.php/([a-z]{1})(.*)$ images2.php?$1=$2&%{QUERY_STRING} [L]2.Rename these files to new filenames:
show.php->show2.php
out.php->out2.php
view.php->view2.php
image.php->image2.php3.Remember to enable static url from admin panel:
To enable static url,login in admin panel,browser to "Site>configuration>URL-Rewrite Setting",select 'yes' for "Enable Static Url for site?".