horrighs

Well-Known Member
Mar 8, 2003
75
0
156
Is there anyway to modify how cPanel writes the .htaccess files? I have a customer that does Affilate redirections. They basically setupa addon domain on there account and then tell it to redirect that domain to a affiliate encoded link.

The probelm is cPanel uses the "RedirectMatch" directive like this:

RedirectMatch .* http://listings.ebay.com/pool2/plistings/list/all/category20571/index.html?from=R4

(note thats all on one line)

If the htaccess file was setup like this:


Redirect / http://listings.ebay.com/pool2/plistings/list/all/category20571/index.html?from=R4

(note thats all on one line)


basically the problem is the RedirectMatch directive has a problem with the "?" but Redirect does not.

Ideally i would love for cPanel to fix this problem or if it is not a problem make a toggle so you could select which way to make the htaccess. but if its possible could i pay someone to make me a fix? :)
 

Website Rob

Well-Known Member
Mar 23, 2002
1,504
1
318
Alberta, Canada
cPanel Access Level
Root Administrator
One suggestion is to setup the .htaccess in the desired way then in Shell: chattr -i .htaccess -- which means, from now on, the file can only be changed manually.
 

horrighs

Well-Known Member
Mar 8, 2003
75
0
156
But i am tring to keep the end user from having to go to the trouble of editing the file directly.