Jump to content

Recommended Posts

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.