Hello Friends
I am stuck with wired .htacess problem, no clue what's problem??:(. It
is server related problem or my .htaccess syntax. I have following
rules for one of site
RewriteEngine On
RewriteBase /3.0/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(segment|service|product|productcategory|
course|news|register|phpinfo)/(.*)$ [OR,NC]
RewriteCond %{REQUEST_URI} ^/(segment|service|product|productcategory|
course|news|register|phpinfo)\.html$ [NC]
RewriteRule ^(.*)\.html$ %1.php?param=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ index.php?param=$1 [L,QSA]
My complete site is running under "3.0" folder and have following kind
of urls for which I have written RewriteRule
mydomain.com/3.0/service/Investigations.html
mydomain.com/3.0/productcategory/Nuix.html
mydomain.com/3.0/News.html
mydomain.com/3.0/course/Nuix-Forensic-Desktop/ViewDetail.html
It's working perfectly with my local server but not working at online
domain. After debugging, I found that "param" querystring is not
getting created by RewriteRule at
RewriteRule ^(.*)\.html$ %1.php?param=$1 [L,QSA]
But very strange as it is working at last line
RewriteRule ^(.*)\.html$ index.php?param=$1 [L,QSA]
Request is get redirected to specific php file, I mean
productcategory.php, product.php, news.php, etc but "param"
querystring is not sent. So I think RewriteRule is correct. But
something strange happening or I'm missing something.
Even I tried to statically redirect to particular file like
RewriteRule ^(.*)\.html productcategory.php?param=$1 [L,QSA]
But no luck. :(
If anyone have any clue/help on above problem, please help me.
Thanks in advance.
Regards,
Dinesh Sailor