Apache RewriteCond from result of php request -
I would like to add a rewrite status to my htaccess that is a "php" file incorrectly or otherwise. I'm using U switch in my RewriteCond to run a subrequest and if the condition is not satisfied, PHP script returns a 404 error, which runs RewriteCond.
My goal is to run a URL Small service in parallel with a PHP website.
Here is my current .htaccess
RewriteCond% {RewriteEngine on current REQUEST_FILENAME}! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteCond / smallurl /% {REQUEST_URI}! You RewriteRule (. *) Index.php / $ 1 (. *) [L] RewriteCond% {REQUEST_FILENAME}! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteRule smallurl / $ 1 [L]
What is the best practice to achieve something like this? Compliance, Things I Should Know?
thanks
You can create a RewriteMap REQUEST_URI
- I think it will work with RewriteCond
, though you think that It works better as standard RewriteRule
Basically, your PHP file needs to be read from php: / / stdin And output the results in stdout
Sorry I do not have much more useful In may, it is not something that I long!
Comments
Post a Comment