View Full Version : This mod_rewrite rule does not work

07-06-2011, 09:54 PM

Can you check these conditions and rule?

RewriteBase /

RewriteCond %{REQUEST_URI} ^/probando$
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !frontend_dev\.php
RewriteRule ^probando$ frontend_dev\.php [L]

What I plan to do with this is, when someone enters URL http://www.mydomain.com/probando, I want the server to act like the following URL: http://www.mydomain.com/frontend_dev.php

It works when I use

RewriteRule ^probando$ frontend_dev\.php [R=301,L]

But I don't want a redirect because I want the URL in browser to remain unchanged.

Any help will be greatly appreciated


07-08-2011, 10:27 PM
If you simply don't want the re-direct, why not just use the second example you posted but remove the R=301 part....

RewriteRule ^probando$ frontend_dev\.php [L]

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum