About the syntax of module rewrite

vadimskorohod

New Member
i have some question about the syntax of module rewrite. i would like to know how to write a rule to not include/contain some file?For example:Directories structure:
  • /
  • /home.php
  • /profile.php
  • /pages
  • /pages/index.php
  • /pages/.htaccess
About the /pages/index.php content:\[code\]<?php include_once "../home.php" ?>\[/code\]About the /home.php content:\[code\]<a href="http://stackoverflow.com/questions/3546701/profile.php">Profile</a>\[/code\]So: i would like to write a .htaccess in the pages directory, and make the hyperlink (profile.php) is correct when user click on Profile text.\[code\]RewriteEngine OnRewriteBase /pages2RewriteRule ^(images|css|js|plugins)/(.*) http://localhost/$1/$2# if end with .php ext and file name not index.php then redirect to parent directoryRewriteCond %{SCRIPT_FILENAME} .php$RewriteCond %{SCRIPT_FILENAME} !index.php$ ## not work ?RewriteRule ^(.*) http://localhost/$1\[/code\]In this case , i can not change the root path file content.
 
Back
Top