Results 1 to 10 of 10
Thread: .htaccess rewrite rule
-
05-24-2011, 10:05 AM #1WHT Addict
- Join Date
- Mar 2009
- Location
- Lawrence, KS
- Posts
- 125
.htaccess rewrite rule
Hello,
Recently I moved my WHMCS install which has broken a PayPal IPN. Currently I have this redirect in place:
RewriteCond %{HTTP_HOST} ^rockandrollhosting.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.rockandrollhosting.com$
RewriteRule ^clients\/?(.*)$ "http\:\/\/my\.rockhost\.com\/$1" [R=301,L]
However, there is one single url behind /client that I need to be the exception to the rule: https://www.rockandrollhosting.com/c...ack/paypal.php
I have Google'd myself googly eye'd without much luck. Any ideas?
Thanks!
-
05-24-2011, 10:24 AM #2Junior Guru Wannabe
- Join Date
- Nov 2005
- Posts
- 53
RewriteCond %{REQUEST_URL} !^/clients/modules/gateways/callback/paypal\.php$
-
05-24-2011, 10:30 AM #3WHT Addict
- Join Date
- Mar 2009
- Location
- Lawrence, KS
- Posts
- 125
Hmm...I'm afraid that didn't work. Does it matter where I add that line in my .htaccess file? Thanks.
-
05-24-2011, 11:35 AM #4Disabled
- Join Date
- Jun 2007
- Location
- London, United Kingdom
- Posts
- 857
Use the ignore rule:
RewriteRule ^(folder|anotherfolder|images|clients)(/.*)?$ - [NC,L]
Hope this helps
-
05-24-2011, 11:49 AM #5WHT Addict
- Join Date
- Mar 2009
- Location
- Lawrence, KS
- Posts
- 125
Well I got a 404 Not Found error with that syntax. Should I modify any of that code beside the directory names? I used:
RewriteRule ^(clients|modules|gateways|callback)(/.*)?$ - [NC,L]
The actual file is /clients/modules/gateways/callback/paypal.php
Thanks!
-
05-24-2011, 12:16 PM #6Disabled
- Join Date
- Jun 2007
- Location
- London, United Kingdom
- Posts
- 857
The full .htaccess file should look something like this for you (just based on the ignore rule):
RewriteEngine on
RewriteBase /
# ignore following directories
RewriteRule ^(clients|modules|gateways|callback)(/.*)?$ - [NC,L]
-
05-24-2011, 12:24 PM #7WHT Addict
- Join Date
- Mar 2009
- Location
- Lawrence, KS
- Posts
- 125
Well, that creates a 404 Not Found error for the actual url I'm trying to fix and stops the wildcard redirect altogether.
What the hell... How would you edit this?
--------------------
RewriteEngine on
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.rockandrollhosting.com
AuthUserFile /home/rockandr/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/rockandr/public_html/_vti_pvt/service.grp
Options +FollowSymLinks
AddType application/x-httpd-php .shtml
RewriteCond %{HTTP_HOST} ^rockandrollhosting.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.rockandrollhosting.com$
RewriteRule ^clients\/?(.*)$ "http\:\/\/my\.rockhost\.com\/$1" [R=301,L]
-
05-24-2011, 02:11 PM #8Dewlance® Shared/Reseller/Master Reseller - US/UK/EU/FRK/CA - SSD
WHMCS ReadyMadeKB - Tutorials for cPanel/InterWorx/Softaculous& Growing..
DemoTiger.com - Buy Demo Videos for your Hosting Company
-
05-24-2011, 02:25 PM #9WHT Addict
- Join Date
- Mar 2009
- Location
- Lawrence, KS
- Posts
- 125
Because that doesn't work for existing subscriptions. I have a ticket open with PayPal and WHMCS. Trust me, this is the proper solution.
-
05-24-2011, 02:38 PM #10
ok,
I am sorry if I am wrong
Redirect 301 /clients/modules/gateways/callback/paypal.php http://rockandrollhosting.com/client...ack/paypal.phpDewlance® Shared/Reseller/Master Reseller - US/UK/EU/FRK/CA - SSD
WHMCS ReadyMadeKB - Tutorials for cPanel/InterWorx/Softaculous& Growing..
DemoTiger.com - Buy Demo Videos for your Hosting Company
Similar Threads
-
(Basic) Joining rewrite rule in htaccess
By basketmen in forum Programming DiscussionReplies: 1Last Post: 09-26-2010, 01:26 PM -
.htaccess rewrite rule problem - need help
By l0ck_up in forum Programming DiscussionReplies: 8Last Post: 07-18-2008, 10:52 PM -
Rewrite rule in .htaccess file take too much process
By renegate_7 in forum Web HostingReplies: 1Last Post: 09-17-2006, 08:02 PM -
.htaccess rewrite rule
By PostiniWholesaler in forum Web Design and ContentReplies: 1Last Post: 11-22-2005, 12:44 PM -
[htaccess] Simple Rewrite Rule (! gets treated as ?)
By Barti1987 in forum Programming DiscussionReplies: 7Last Post: 04-22-2005, 05:48 AM