Forum Moderators: phranque
*) RewriteRule ^betisier\.php$ page.php [L] (This is working for me)
*) RewriteRule ^onenparle/presse\.php$ onenparle.php [L] (This is not working for me)
onenparle is a folder which is not exist in my server.
In top of my htaccess, I have added these two lines. This htaccess is written in the subfolder (tdm)
RewriteEngine on
RewriteBase /tdm
Please let know why the second rewriterule is not working...
Thanks
Agriz
Also, be aware that you should completely flush (or delete) your browser cache after making any changes to your server-side configuration code.
Jim
Thanks for your reply. I was out of station. I am unable to check my mails.
1) Scripts are inside tdm folder.
2) Below are the examples which i tried:
*)RewriteRule ^tdm/onenparle/presse\.php$ tdm/onenparle.php
[L]
*)RewriteRule ^/tdm/onenparle/presse\.php$ /tdm/onenparle.php [L]
*)RewriteRule ^/onenparle/presse\.php$ /onenparle.php [L]
Even i tried to give full path. It is not working :-(
SOMETHING DIFFERENT I TRIED:
-----------------------------
*) I created a new folder in the name of onenparle. Then this htaccess code works! But normally it should work without this folder ?!?
*) onenparle.php is the only file which exist in my server (tdm folder)
Is this problem because of the same name of folder name and file name? (I am not really good in htaccess.)
Thanks
Agriz
Options +FollowSymLinks -MultiViews
RewriteEngine on
#
RewriteRule ^betisier\.php$ page.php [L]
RewriteRule ^onenparle/presse\.php$ onenparle.php [L]
The first will be rewritten to example.com/page.php
The 2nd will be rewritten to example.com/onenparle.php
RewriteBase is probably not needed, unless your server is not configured normally.
Jim
This Options line enables FollowSymLinks, which is required by mod_rewrite (see mod_rewrite documentation) and it disables MultiViews (content-negotiation), which can otherwise interfere with mod_rewrite when the requested URL does not resolve to an existing file (See Apache mod_negotiation docs).
Jim