How to mask an URL with .htaccess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Hi.

I want to make http://mysite.com/post/004.htm -->
http://mysite.com/post.php?id=004
but not redirecting but masking the URL (the first URL must be shown
and not the second one).

My .httaccess:
--------------------------
RewriteEngine On
RewriteBase /
DirectoryIndex index.php index.html
RewriteRule ^post/(.*).htm post.php?id=$1 [R=301,L]
---------------------------

I also tried with:
RewriteRule ^post/(.*).htm post.php?id=$1 **whithout R,L**
I got this URL: http://mysite.com/post.php/005.htm?id=005

I also tried with
RewriteRule ^post/(.*).htm post.php?id=$1 [L]
I got this URL: http://mysite.com/post.php?id=005

I also tried with
RewriteRule ^post/(.*).htm http://mysite.com/post.php?id=$1 [L]
I got this URL: http://mysite.com//post.php/005.htm?id=005

Any suggestion?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux