[PHP] URL Rewrite not working for me
Hi all, I've set up a url rewrite code below. Options +FollowSymLinks RewriteEngine on RewriteRule profile/username/(.*) profile.php?username=$1 It only works when I type in this url http://www.example.com/profiles/profile/username/baller/ If i do not then the normal url http://www.example.com/profiles/profile.php?username=baller is displayed. I just want the new url to show when ever I trype in the old url. Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite not working for me
Don Don wrote: Hi all, I've set up a url rewrite code below. Options +FollowSymLinks RewriteEngine on RewriteRule profile/username/(.*) profile.php?username=$1 It only works when I type in this url http://www.example.com/profiles/profile/username/baller/ If i do not then the normal url http://www.example.com/profiles/profile.php?username=baller is displayed. I just want the new url to show when ever I trype in the old url. Ah, you want an external redirect then. It's really a case of RTFM, but just add '[r]' to the end of your RewriteRule. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite not working for me
Hi Per, changed the rewrite to this Options +FollowSymLinks RewriteEngine on RewriteRule profile/username/(.*) profile.php?username=$1 [r] but sill does not work the way i want. Entering this url http://example.com/profiles/profile.php?username=baller does not cnage to http://localhost/profiles/profile/username/baller --- On Fri, 7/25/08, Per Jessen [EMAIL PROTECTED] wrote: From: Per Jessen [EMAIL PROTECTED] Subject: Re: [PHP] URL Rewrite not working for me To: php-general@lists.php.net Date: Friday, July 25, 2008, 3:15 AM Don Don wrote: Hi all, I've set up a url rewrite code below. Options +FollowSymLinks RewriteEngine on RewriteRule profile/username/(.*) profile.php?username=$1 It only works when I type in this url http://www.example.com/profiles/profile/username/baller/ If i do not then the normal url http://www.example.com/profiles/profile.php?username=baller is displayed. I just want the new url to show when ever I trype in the old url. Ah, you want an external redirect then. It's really a case of RTFM, but just add '[r]' to the end of your RewriteRule. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite not working for me
Hi!! For Internal redirection: RewriteRule profile/username/([^/]+) profile.php?username=$1 [PT] On Fri, Jul 25, 2008 at 3:00 AM, Don Don [EMAIL PROTECTED] wrote: Hi all, I've set up a url rewrite code below. Options +FollowSymLinks RewriteEngine on RewriteRule profile/username/(.*) profile.php?username=$1 It only works when I type in this url http://www.example.com/profiles/profile/username/baller/ If i do not then the normal url http://www.example.com/profiles/profile.php?username=baller is displayed. I just want the new url to show when ever I trype in the old url. Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://www.kingzones.org/
Re: [PHP] URL Rewrite not working for me
Don Don wrote: Hi Per, changed the rewrite to this Options +FollowSymLinks RewriteEngine on RewriteRule profile/username/(.*) profile.php?username=$1 [r] but sill does not work the way i want. Entering this url http://example.com/profiles/profile.php?username=baller does not cnage to http://localhost/profiles/profile/username/baller Ah, you want it the other way round then. The rewriterule is: rewriterule frompattern to /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite not working for me
On Fri, Jul 25, 2008 at 6:00 AM, Don Don [EMAIL PROTECTED] wrote: Hi all, I've set up a url rewrite code below. Options +FollowSymLinks RewriteEngine on RewriteRule profile/username/(.*) profile.php?username=$1 It only works when I type in this url http://www.example.com/profiles/profile/username/baller/ If i do not then the normal url http://www.example.com/profiles/profile.php?username=baller is displayed. Per's answer is probably exactly what you're looking for, Don. Keep in mind, though, that this isn't a PHP question. Future questions of this nature would be better suited for the Apache list. You may find sometimes that asking a question on the wrong list will be ignored. Not because people don't want to help, just because they may read it and skip over it. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite not working for me
Daniel Brown wrote: Per's answer is probably exactly what you're looking for, Don. Keep in mind, though, that this isn't a PHP question. Future questions of this nature would be better suited for the Apache list. Couldn't agree more. You may find sometimes that asking a question on the wrong list will be ignored. Not because people don't want to help, just because they may read it and skip over it. Couldn't agree more. However, Don's question was of the kind that is easily overlooked on the apache list, where topics tend to be a little less basic. I tend to think that basic apache/php questions are sometimes better asked here, even if they are really off-topic. It doesn't hurt anyone, and the poster is actually likely to get a decent/useful answer fairly quickly - due to the amount of plain user/developer experience that is available here. I could easily have waved Don away with a plain RTFM, but I saw no real reason. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite not working for me
On Fri, Jul 25, 2008 at 3:59 PM, Per Jessen [EMAIL PROTECTED] wrote: However, Don's question was of the kind that is easily overlooked on the apache list, where topics tend to be a little less basic. I tend to think that basic apache/php questions are sometimes better asked here, even if they are really off-topic. It doesn't hurt anyone, and the poster is actually likely to get a decent/useful answer fairly quickly - due to the amount of plain user/developer experience that is available here. And I agree with you on these points, but at the same time, by not recommending that the question be asked on the appropriate list first, we're not only encouraging misplaced posts, but also cheating the poster themselves. They may not even be aware that there are separate lists; a couple of times from the top of my head, responses have been, I wasn't aware there was a list for [insert project name here]. I could easily have waved Don away with a plain RTFM, but I saw no real reason. Yes, but that's you it's because you're a nice guy. And what do you expect from someone who lives in a city frequently rated as best quality of life in the world? -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite
Look at http://framework.zend.com/manual/en/zend.controller.router.html Apache configuration et framework methods to rout your files are there. Subhranil [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] Hi All, I want to show one URL at browser and content of different URL. Like user can see the URL at address bar like http://localhost/test/home/ or http://localhost/test/tech/php/but content of page will be http://localhost/test/index.php The URL of the address bar will never change to http://localhost/test/index.php Still a newbie! Thanks, Subhranild. -- View this message in context: http://www.nabble.com/URL-Rewrite-tp18233803p18233803.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URL Rewrite
Hi All, I want to show one URL at browser and content of different URL. Like user can see the URL at address bar like http://localhost/test/home/ or http://localhost/test/tech/php/but content of page will be http://localhost/test/index.php The URL of the address bar will never change to http://localhost/test/index.php Still a newbie! Thanks, Subhranild. -- View this message in context: http://www.nabble.com/URL-Rewrite-tp18233803p18233803.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite
Subhranil wrote: Hi All, I want to show one URL at browser and content of different URL. Take a look at apache url rewriting. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite
On Wed, Jul 2, 2008 at 6:33 AM, Per Jessen [EMAIL PROTECTED] wrote: Subhranil wrote: Hi All, I want to show one URL at browser and content of different URL. Take a look at apache url rewriting. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You could look at using an iframe or frames in general, or ajax call into a div -- Bastien Cat, the other other white meat
Re: [PHP] URL Rewrite
On Wednesday 02 July 2008 13:34:32 Bastien Koert wrote: On Wed, Jul 2, 2008 at 6:33 AM, Per Jessen [EMAIL PROTECTED] wrote: Subhranil wrote: Hi All, I want to show one URL at browser and content of different URL. Take a look at apache url rewriting. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You could look at using an iframe or frames in general, or ajax call into a div that suggestion is wrong on so many levels. using a hack to manage something ment to be handled before page is sent. I lean toward the apache rewritemod -- --- Børge Holen http://www.arivene.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URL Rewrite???
Hi all Not really a php issue per se - sorry. But I'm sure someone here is bound to know the answer. :-) I have a main site that is accessible at say http://www.somedomain.com/somedir/; but I want visitors to be able to access the site using simply http://www.somedomain.com; AND for the resulting URL displayed to STILL say http://www.somedomain.com; and not http://www.somedomain.com/somedir/;. Should this be possible using the .htaccess file and some mod_rewrite rule? Toyed around with that but couldn't get it to work. ANY help would be greatly appreciated, thanks P.S. Platform: Linux RedHat (running Apache) scorpy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL Rewrite???
Keith wrote: Hi all Not really a php issue per se - sorry. But I'm sure someone here is bound to know the answer. :-) I have a main site that is accessible at say http://www.somedomain.com/somedir/; but I want visitors to be able to access the site using simply http://www.somedomain.com; AND for the resulting URL displayed to STILL say http://www.somedomain.com; and not http://www.somedomain.com/somedir/;. Should this be possible using the .htaccess file and some mod_rewrite rule? Toyed around with that but couldn't get it to work. when you finished toying did you take time to read the Apache docs on mod_rewrite? you need *something like*: RewriteRule ^/(.*)$ /somedir/$1 [L] ANY help would be greatly appreciated, thanks P.S. Platform: Linux RedHat (running Apache) scorpy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] url rewrite
hello, i am not sure where to post this question, since it's partly related to PHP, so i'll ask here. I'd like to rewrite a url that looks like this: /news/articles/article.php?id=255 into /news/articles/255/ any help is appreciated. cheers, - Sebastian
Re: [PHP] url rewrite
On Friday 28 March 2003 16:38, Sebastian wrote: i am not sure where to post this question, since it's partly related to PHP, so i'll ask here. Ask google or ask the archives. I'd like to rewrite a url that looks like this: /news/articles/article.php?id=255 into /news/articles/255/ -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I know the answer! The answer lies within the heart of all mankind! The answer is twelve? I think I'm in the wrong building. -- Charles Schulz */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] url rewrite
if that were the case I wouldn't have asked here.. perhaps i didn't find the answer at google or the archives. - Original Message - From: Jason Wong [EMAIL PROTECTED] Ask google or ask the archives. | On Friday 28 March 2003 16:38, Sebastian wrote: | | i am not sure where to post this question, since it's partly related to | PHP, so i'll ask here. | | I'd like to rewrite a url | that looks like this: /news/articles/article.php?id=255 | | into /news/articles/255/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] url rewrite
Sebastian wrote: if that were the case I wouldn't have asked here.. perhaps i didn't find the answer at google or the archives. - Original Message - From: Jason Wong [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Ask google or ask the archives. | On Friday 28 March 2003 16:38, Sebastian wrote: | | i am not sure where to post this question, since it's partly related to | PHP, so i'll ask here. | | I'd like to rewrite a url | that looks like this: /news/articles/article.php?id=255 | | into /news/articles/255/ As a long time contributor to this list, Jason knows that this question has been asked many times. To help your research, I put search engine friendly url into the list archive at http://marc.theaimsgroup.com at got quite a list back. One of these gives a reference to http://www.faqts.com/knowledge_base/view.phtml/aid/124 which gives tutorials for doing it in PHP, mod_rewrite and/or mod_mime. Hoping this helps. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URL Rewrite Problems...
Hello Everyone, I have recently written a script to change htpasswd via a web interface. The script is running fine, but all of the variables (by default) are being sent in the url. I have not called any of the URL functions, so I am not exactly sure why this is happening. Is there something in the php.ini or at compile time which is enabling this. The problem ends up being that passwords are sent in plain text in the url! Help! Brendan _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] URL Rewrite Problems...
You forgot to add a method=POST into your form tag. Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Mon, 13 Aug 2001 09:35:39 -0500 Brendan P. Caulfield [EMAIL PROTECTED] wrote: Hello Everyone, I have recently written a script to change htpasswd via a web interface. The script is running fine, but all of the variables (by default) are being sent in the url. I have not called any of the URL functions, so I am not exactly sure why this is happening. Is there something in the php.ini or at compile time which is enabling this. The problem ends up being that passwords are sent in plain text in the url! Help! Brendan _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]