GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Htaccess Rewrite Help (https://gfy.com/showthread.php?t=966348)

BIGTYMER 05-02-2010 12:17 AM

Htaccess Rewrite Help
 
I'm trying to get a url to rewrite but its not working. I know I'm doing it wrong.

RewriteEngine on
RewriteRule ^page?n=(.*)&k=(.*)$ page.php?n=$1&k=$2 [NC]

I'm trying to get site.com/page?n=VAR&k=VAR to redirect to page.php?n=VAR&k=VAR.

Thanks for your help. :)

Jack Sparrow 05-02-2010 03:18 AM

Does this help a bit:http://www.askapache.com/htaccess/co...-examples.html

?

LoveSandra 05-02-2010 06:17 AM

bump bump:)

fris 05-02-2010 06:19 AM

thats not very search engine friendly

BIGTYMER 05-02-2010 09:04 PM

Quote:

Originally Posted by mrfrisky (Post 17095271)

I got it thanks. :)

BIGTYMER 05-02-2010 09:06 PM

Quote:

Originally Posted by fris (Post 17095447)
thats not very search engine friendly

Its all good. I'm only using it for click and campaign tracking.

BIGTYMER 05-02-2010 09:08 PM

Here is the correct working code.

RewriteEngine on
RewriteCond %{QUERY_STRING} ^(n=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(k=.*)$ [NC]
RewriteRule ^page(.*)$ /page.php\?&%{QUERY_STRING} [L]


All times are GMT -7. The time now is 06:52 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc