Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 7th Jan 2015, 11:21 AM   #1
10minuteexpert.com
War Room Member
 
John Hocking's Avatar
 
Join Date: 2004
Location: O'Fallon MO , USA.
Posts: 766
Thanks: 102
Thanked 206 Times in 124 Posts
Default
How To Exclude File from Wordpress Redirect?
Share on: 
fb share twitter share gplus share more share

I have a Wordpress site and am trying to create a friendly url for an affiliate link masker.

I have a file called hoplink.php and I need to pass a value vin=xxxxx but I want to include the url like domain.com/hoplink/xxxxx

I have tried the code below in the htaccess file but it seems to still be picked up by wordpress and treated as a 404.

Any Help would be appreaciated.


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^hoplink/([A-Za-z0-9-]+)/?$ hoplink.php?vin=$1 [L]
</IfModule>

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

John Hocking

John Hocking is offline  
Unread 7th Jan 2015, 11:56 AM   #2
Active Warrior
 
gaetanoc's Avatar
 
Join Date: 2011
Location: Malta
Posts: 62
Thanks: 0
Thanked 9 Times in 9 Posts
Default
Re: How To Exclude File from Wordpress Redirect?
Share on: 
fb share twitter share gplus share more share

Make sure you are editing the root .htaccess.

The following is an example I have found for you.

Code:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+download.php?id=([0-9]+)&name=([^s&]+)s [NC]
RewriteRule ^ download/%1/%2? [R=301,L]
RewriteRule ^download/([0-9]+)/([^/]+)/?$ download.php?id=$1&name=$2 [L]

An experienced technical programmer wants to JV with you


I will build any kind of software, bots, web applications, desktop applications, mobile applications - you will handle marketing and sales.
gaetanoc is offline  
Unread 7th Jan 2015, 01:01 PM   #3
10minuteexpert.com
War Room Member
 
John Hocking's Avatar
 
Join Date: 2004
Location: O'Fallon MO , USA.
Posts: 766
Thanks: 102
Thanked 206 Times in 124 Posts
Default
Re: How To Exclude File from Wordpress Redirect?
Share on: 
fb share twitter share gplus share more share

Thank You.

I will give it a try.

John Hocking is offline  
Unread 7th Jan 2015, 03:19 PM   #4
Active Warrior
 
gaetanoc's Avatar
 
Join Date: 2011
Location: Malta
Posts: 62
Thanks: 0
Thanked 9 Times in 9 Posts
Default
Re: How To Exclude File from Wordpress Redirect?
Share on: 
fb share twitter share gplus share more share

let me know if you still have a problem. I will set up an example on my local development machine and make sure it is working like you need it

An experienced technical programmer wants to JV with you


I will build any kind of software, bots, web applications, desktop applications, mobile applications - you will handle marketing and sales.
gaetanoc is offline  
Closed Thread


Bookmarks

Tags
exclude, file, redirect, wordpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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




All times are GMT -6. The time now is 05:48 PM.