CaesarGdi Posted June 6, 2008 Share Posted June 6, 2008 I am testing a script that I may use on my site. The script assumes that all folder/file are in the root folder but I have them in a /dev folder. I tried editing the Mod_Rewrite script but it is still trying to open the files on root. Here is an example of the code. Orginal Code RewriteEngine On RewriteCond %{REQUEST_URI} !^/workplace/(.*) RewriteCond %{REQUEST_URI} !^/media/(.*) RewriteCond %{REQUEST_URI} !^/cre/cre\.php #just a dir RewriteCond %{REQUEST_URI} !^(.*)0\.(.*)\.(.*)\.(.*)\.html RewriteRule ^(.*) /cre/cre.php?path=$1 [L] #normal file RewriteRule ^(.*)0\.(.*)\.(.*)\.(.*)\.html /cre/cre.php?path=$1&vfsid=$2&page=$3&option=$4 [L] Modified Code RewriteEngine On RewriteBase /dev/ RewriteCond %{REQUEST_URI} !^/dev/workplace/(.*) RewriteCond %{REQUEST_URI} !^/dev/media/(.*) RewriteCond %{REQUEST_URI} !^/dev/cre/cre\.php #just a dir RewriteCond %{REQUEST_URI} !^(.*)0\.(.*)\.(.*)\.(.*)dev\.html RewriteRule ^(.*) /dev/cre/cre.php?path=$1 [L] #normal file RewriteRule ^(.*)0\.(.*)\.(.*)\.(.*)\.html /dev/cre/cre.php?path=$1&vfsid=$2&page=$3&option=$4 [L] I apologize and hope this makes since but I am very new to php and Mod_Rewrites. Quote Link to comment https://forums.phpfreaks.com/topic/109030-help-with-moving-pages-from-root-to-a-sub-folder/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.