Jump to content

Internal Redirect


The Little Guy

Recommended Posts

OK, I would like to have EVERY PHP file directed and ran through another PHP file.

 

Currently I have this, and it gives me an 500 error

Options +FollowSymlinks
RewriteEngine On
RewriteRule statistics/javascripts/stats.js statistics/javascripts/stats.php
RewriteRule ^(.*\.(php|js))$ rFile.php?filename=$1 [nc]

Link to comment
Share on other sites

I don't know if this is your problem but rFile.php ought to have a slash on the front. If you're in a subfolder it may be looking for the file in the wrong place.

 

Second, does it work if you replace it with two lines, one matching php and one matching js? In other words, splitting the (php|js) part.

 

Also, not a cause of the problem, but why do you rewrite a .js file as a .php file? If it has PHP code in then you could force the JS file to act as PHP (and optionally adding a content-type header to the end of the file to set it back to javascript again).

Link to comment
Share on other sites

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.