0

Hi All,

I am trying to implement a directory like url rewriting in php.

My URL goes like this www.xyz.com/Parameter1/Parameter2/1
This request is forwarded to a php script, getParams.php
Parameter1 and Parameter2 in the URL are GET parameters. "1" in the url indicates the page number.

The URL rule that I am writing is
RewriteRule ^(.*)/(.*)/([0-9]*)$ getParams.php?para1=$1&para2=$2&page=$3

The problem is that when the URL is rewritten to getParam.php on the ServerSide and I do an echo on para1
i.e echo para1

First letter of every word is converted to lowercase.
Example if I pass my name in para1 as "Vaibhav Ranglani" and then if I do an echo in getParam.php as

echo $para1;

I'll get the output as
vaibhav ranglani

Here the first letter of every word is converted to lowercase.
Same thing is not happening with para2

I would appreciate any help.

Thanks in Advance
Regards
Vaibhav

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by vaibhav1983
0

Seems to me you should be doing these types of rewrites in .htaccess, to send proper server response codes to requester. But if you must do it this way, note that Windows hosting is generally case-insensitive so PAGE.html and page.html are the same. But may not be so on a Linux server.

Otherwise I'm not sure how to help as the problem could be some server configuration or in your PHP code. You could post the relevant code, or ask your host (read the manuals) on whether parameters are automatically stripped of case.

Good luck!

0

Hi guyinpv,

The issue is resolved. The URL is not causing a problem. Actually I was not capturing para1 and para2 as per the requirements.

Thanks anyways.

Cheers

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.