Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-06-2011, 09:54 PM   PM User | #1
jstuardo
New to the CF scene

 
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
jstuardo is an unknown quantity at this point
This mod_rewrite rule does not work

Hello....

Can you check these conditions and rule?

Code:
  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

Code:
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

Thanks
Jaime
jstuardo is offline   Reply With Quote
Old 07-08-2011, 10:27 PM   PM User | #2
Cags
New Coder

 
Join Date: Jul 2011
Posts: 67
Thanks: 0
Thanked 13 Times in 13 Posts
Cags is an unknown quantity at this point
If you simply don't want the re-direct, why not just use the second example you posted but remove the R=301 part....

Code:
RewriteRule ^probando$ frontend_dev\.php [L]
Cags is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:12 AM.


Advertisement
Log in to turn off these ads.