| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Jan 2007
Posts: 207
![]() | $5 for giving me fix - extremely annoying small error Basically, if you go to http://www.proxy.gd/proxies/proxy.php?id=73 it'll redirect, however when I go to http://www.proxy.gd/proxy/id/73/ it doesn't redirect, it always used to and for some reason it's just stopped. My code is below. PHP Code: ????: NamePros.com http://www.namepros.com/showthread.php?t=298839 Options +FollowSymLinks RewriteEngine on RewriteRule proxy/(.*)/(.*)/$ /proxies/proxy.php?$1=$2 Is my mod_rewrite code. If you can help me fix this and get the mod_rewrited url working I'll send you $5 via paypal, thanks. |
| |
| | #2 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: United Kingdom
Posts: 413
![]() ![]() ![]() | I'm not entirely sure with mod_rewrite, but it may be worth trying Code: Options +FollowSymLinks RewriteEngine on RewriteRule ./proxy/(.*)/(.*)/$ /proxies/proxy.php?$1=$2 ????: NamePros.com http://www.namepros.com/showthread.php?t=298839 If that doesn't work then try putting <?php echo $_SERVER['REQUEST_URI']; ?> at the top of proxy.php, then accessing it through the mod_rewrited file and if it doesn't come up with a URL like the other page, then that narrows it down to the .htaccess file, if the URL is like the non-mod_rewrite one, then it must be a php problem
__________________ Linux Screenshots
Last edited by lee101; 02-26-2007 at 09:33 AM.
|
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Jan 2007
Posts: 207
![]() | That mod_rewrite code didn't work, putting that request code thing in proxy.php showed "/proxies/proxy.php?id=73" on http://www.proxy.gd/proxies/proxy.php?id=73 - but not on the mod_rewrite part. |
| |
| | #4 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: United Kingdom
Posts: 413
![]() ![]() ![]() | hmm, i see what you mean about this being an annoying errror lol, I am thinking this is a mod_reqrite error then, since it doesn't seem to be passing on the variables correctly Try these, in the following order 1st Code: Options +FollowSymLinks RewriteEngine on RewriteRule ./proxy/(.+?)/(.+?)/$ /proxies/proxy.php?$1=$2 Code: Options +FollowSymLinks RewriteEngine on RewriteRule ./proxy/(.+?)/(.+?)/ /proxies/proxy.php?$1=$2 Code: Options +FollowSymLinks RewriteEngine on RewriteRule ^proxy/(.*)/(.*)/$ /proxies/proxy.php?$1=$2 ![]() Code: Options +FollowSymLinks RewriteEngine on RewriteRule ^proxy/(.+?)/(.+?)/$ /proxies/proxy.php?$1=$2 ????: NamePros.com http://www.namepros.com/showthread.php?t=298839 Lee
__________________ Linux Screenshots
Last edited by lee101; 02-26-2007 at 09:50 AM.
|
| |
| | #6 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: United Kingdom
Posts: 413
![]() ![]() ![]() | Argh dammit! Last attempt lol, after that I'm afraid I may give up Code: RewriteEngine On RewriteRule ^page/(.+)$ /proxies/proxy.php?id=$1 Lee
__________________ Linux Screenshots |
| |