DNforum.com - Domain Sales, Domain Forum, Domain Appraisals
 
Register Now! Welcome to Dnforum.com You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast and simple so please, join our community today! If you have any problems with the registration process or your account login, please contact us.
Go Back   DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars > Content Development > Website Development and Design Discussion > Coding/Programming/Languages
Reply
 
LinkBack Thread Tools Display Modes
Old 07-12-2007, 09:31 AM   #1 (permalink)
Platinum Lifetime Member
 
darmar's Avatar
 
Name: Darko Martic
Last Online: 07-22-2008 04:57 AM
iTrader: (1)
Join Date: Dec 2006
Posts: 90
DNF$: 100
Location: Zagreb, Croatia
Country:


HTACCESS RewriteRule problem

I need some more help....

I can't get to "reuse" variables I'm passing through....

here's my example:
Quote:
RewriteEngine On
RewriteRule ^[a-zA-Z]{5}$ /test.php?myvar=%1 [R=301,L]
(yes, I'm trying to redirect all "www.example.com/abcde" calls to a specific PHP script, with that "abcde" pass as variable)

with this, I get redirected to: "test.php?myvar=" and no value for this variable "myvar"....

I also tried using "$" instead of "%" in RewriteRule statement - but I get the same....

could anybody post a working example of passing variables to script you're redirecting with RewriteRule ?


thank you



=================
reply added:
=================

here's the solution for my latest problem:

Quote:
RewriteEngine On
RewriteRule ^([a-zA-Z]{5})$ /test.php?myvar=$1 [R=301,L]
I forgot to use ( ) and I should use $ instead if %
__________________
Martic.net - Talking in binary since 1980.
AntiWrap.com - Shorten your URLs tool.
TXTberry.com - Text-based services for blackberry and other mobile devices (whois, etc.).

Last edited by darmar; 07-12-2007 at 10:43 AM. Reason: Automerged Doublepost
darmar is offline   Reply With Quote
Old 07-22-2008, 04:57 AM   #2 (permalink)
Platinum Lifetime Member
 
darmar's Avatar
 
Name: Darko Martic
Last Online: 07-22-2008 04:57 AM
iTrader: (1)
Join Date: Dec 2006
Posts: 90
DNF$: 100
Location: Zagreb, Croatia
Country:


here's a nice simple tutorial I wrote:
friendly url
__________________
Martic.net - Talking in binary since 1980.
AntiWrap.com - Shorten your URLs tool.
TXTberry.com - Text-based services for blackberry and other mobile devices (whois, etc.).
darmar is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange and mysterious problem => I'm a bit worried now ... DomainEmpire.com Help Wanted! 9 03-13-2007 02:45 AM
Need htaccess help please.... slobizman Search Engines and Traffic Building 1 07-04-2006 11:31 AM
Adsense Problem Stinos DNForum PPC Templates 11 03-19-2005 06:07 AM
SECURITY ALERT: Bogus Whois Problem Reports Domagon Domain Registration Discussion 2 11-05-2004 06:10 PM
BIG Problem Accessing This Site Duke Gold Cafe 6 09-21-2002 04:27 PM


All times are GMT -4. The time now is 05:11 PM.
Copyright @2001-2008 DNForum.com

Learn Domains
Promote Domains
Research Domains
Buy Domains
Resell Domains
Park Domains
Sell Domains
Build Domains
Host Domains
Trademark Domains
Domain Domains
manage Domains
Appraise Domains