Prosper202 Tracking202 Export202 WorldProxy202 Meetup202 | Blog Forum Newsletter Twitter | Advertise
Login · Register
Home About Docs Scripts Blog Forums Hosting Donate Download

Using mod_rewrite

Post new topic Reply to topic Prosper202 Forum Index » Prosper202 Self-Hosted-Apps
New Posts Search Forum
Author Message
synozeer


Joined: May 30th, 2008
Posts: 22

Post Posted: Aug 17th, 2008 at 12:41am Post subject: Using mod_rewrite Reply with quote

How would I be able to use mod_rewrite and Prosper202 to take the keyword and use it as a directory name?

For example, if I had a search ad and the keyword was mykeyword, could I use mod_rewrite and Prosper to take the clicker to "www.mydomain.com/mykeyword/"? Additionally, are you able to use the {Keyword} variable in the display URL in Adwords?

Back to top
T202Wes
Website Email Twitter Facebook AIM


Joined: Oct 20th, 2007
Posts: 2432

Post Posted: Aug 17th, 2008 at 1:58am Post subject: Re: Using mod_rewrite Reply with quote

synozeer wrote:
How would I be able to use mod_rewrite and Prosper202 to take the keyword and use it as a directory name?

For example, if I had a search ad and the keyword was mykeyword, could I use mod_rewrite and Prosper to take the clicker to "www.mydomain.com/mykeyword/"? Additionally, are you able to use the {Keyword} variable in the display URL in Adwords?

Are you just talking in general, how to make your landing page URLs, have the keyword in them, and look nicely?

-Wes

Back to top
synozeer


Joined: May 30th, 2008
Posts: 22

Post Posted: Aug 17th, 2008 at 9:27am Post subject: Re: Using mod_rewrite Reply with quote

Hey Wes,

More so in using multiple landing pages via mod_rewrite without actually having that many landing pages nor needing to add them into Prosper202.

I'd want to take the keyword that Prosper202 captures and then use mod_rewrite to turn it into a directory. I'm not sure if something special needs to be done because of Prosper202.

For example, if someone searches for "keyword", it would take them to www.domain.com/keyword/, which is created via mod_rewrite.

Thanks,

Adam

Back to top
T202Wes
Website Email Twitter Facebook AIM


Joined: Oct 20th, 2007
Posts: 2432

Post Posted: Aug 17th, 2008 at 4:07pm Post subject: Re: Using mod_rewrite Reply with quote

Hey Adam,

Ok if you want to do this it isn't really Prosper202 that will do it, but more so how you setup your landing pages.

If you want the www.domain.com/keyword/ like that, put this .htaccess file in your root directory. www.domain.com/.htaccess

Quote:

Options +FollowSymLinks

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* /index.php [L]

ok what this is going to do is REDIRECT, EVERYTHING to index.php.

So even if you type in for instance, mydomain.com/test/test/

the file that is going to load is the mydomain.com/index.php

--

You have now re-routed everything, so now on your destination urls you can send traffic to, (with google adwords for instance)

Quote:

DESTINATION URL would look like this

www.mydomain.com/{keyword}/

Now the keyword is your URL, google is dynamically placing it.

That should do it!

Quote:

To make it work with P202 you will have to do it like this

Hey Adam,

Ok if you want to do this it isn't really Prosper202 that will do it, but more so how you setup your landing pages.

If you want the www.domain.com/keyword/ like that, put this .htaccess file in your root directory. www.domain.com/.htaccess

[quote]

Options +FollowSymLinks

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* /index.php [L]

ok what this is going to do is REDIRECT, EVERYTHING to index.php.

So even if you type in for instance, mydomain.com/test/test/

the file that is going to load is the mydomain.com/index.php

--

You have now re-routed everything, so now on your destination urls you can send traffic to, (with google adwords for instance)

Quote:

DESTINATION URL would look like this

www.mydomain.com/{keyword}/?t202id=xxxxx&t202kw={keyword}

Back to top
synozeer


Joined: May 30th, 2008
Posts: 22

Post Posted: Aug 17th, 2008 at 4:23pm Post subject: Re: Using mod_rewrite Reply with quote

Thanks Wes, that's good info.

Since that code does it to everything, how would I have it apply only to a directory?

I created a directory /test/, dropped that .htaccess file in there, and changed:

RewriteRule .* /index.php [L]

to

RewriteRule .* /test/index.php [L]

but I wasn't able to get it to work (I got a not found error). Is there something else I need to change to be able to do that? This way I can keep my main directory for use with regular url access and only use the /test/ directory for my mod_rewrite links.

And since Adwords/etc change the spaces in my keywords to "+", is there a way in that htaccess file to change the "+" to a more aesthetically pleasing "-"?

Back to top
T202Wes
Website Email Twitter Facebook AIM


Joined: Oct 20th, 2007
Posts: 2432

Post Posted: Aug 18th, 2008 at 12:50am Post subject: Re: Using mod_rewrite Reply with quote

That should work, says not found.

did u add the /test/index.php <<< FILE?

Nothing you can do about the adwords stuff, you'll have to redirect out, but thats the way they send it regardless, I'm not sure how much changing it would help.

Back to top
synozeer


Joined: May 30th, 2008
Posts: 22

Post Posted: Aug 18th, 2008 at 12:55am Post subject: Re: Using mod_rewrite Reply with quote

Wes,

I got it working. I must have had an old cache the first time I tried it because now it's working.

Thanks again. I appreciate the help.

Adam

Back to top
Post new topic Reply to topic Page 1 of 1

Creative Commons License This work (Prosper202, Tracking202 and Export202) is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.