Forum Moderators: phranque
I cant seem to find the right help for this..
in phpnuke i wanna use a php module.
its about 30 mb of pages..
i wanna use rewrite ...
url is like...modules.php?name=PHP_Manual
and the lines inside are ..
using seperate pages known as gt-nextgen,same as googletap.
in the gt file i have...
$urlin = array(
"'(?<!/)modules.php\?name=PHP_Manual&page=([a-zA-Z0-9_-.]*)\.html'",
"'(?<!/)modules.php\?name=PHP_Manual'",
);
$urlout = array(
"php-manual-\\1.html",
"php-manual.html",
);
and in the htaccess i have..
RewriteRule ^php-manual-([a-zA-Z0-9_-]*).html modules.php?name=PHP_Manual&page=$1.html [L]
RewriteRule ^php-manual.html modules.php?name=PHP_Manual [L]
but it creates urls like....
php-manual.html&page=install.windows.html
and its just dead...and nothing shows...
Who can help solving this..
However, a few points and questions:
Your PHP code must output the 'static'l-looking links on your pages. Mod_rewrite will then convert those back to query-string-type calls to your script.
I assume you have the required code to setup and enable mod_rewrite in your .htaccess file? That is:
Options +FollowSymLinks
RewriteEngine on
I suggest you 'anchor' your patterns, 'root' your destination URLs, use the [NC] flag where applicable, and escape all literal characters:
RewriteRule ^php-manual-([a-z0-9_\-]*)\.html$ /modules.php?name=PHP_Manual&page=$1.html [NC,L]
RewriteRule ^php-manual\.html$ /modules.php?name=PHP_Manual [L]
Jim