Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-25-2011, 05:07 PM   #1
CYF
Coupon Guru
 
CYF's Avatar
 
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
htaccess help needed

I'm having problems with a script I bought. This is on a freebsd 8.1 machine with apache2.2.17, php5.3.3, mysql5.1.52, and the php5-extensions installed.

The script seems to work fine on linux, and linux VPS. It seems I'm their only freebsd customer so far. Apparently one other guy had the same issue with his htaccess on a VPS but they fixed his .htaccess file.

htaccess works fine on this machine, my other sites are using it, so I'm not sure why I'm having a problem with this.

Any help is appreciated

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

<IfModule !mod_rewrite.c>

# Without mod_rewrite, route 404's to the front controller
ErrorDocument 404 /index.php

</IfModule>
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

CYF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2011, 05:25 PM   #2
myneid
Confirmed User
 
myneid's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: Los Angeles
Posts: 736
what is the problem? what is it not doing?
is mod rewrite on on your server? seems sending errordocument 404 to index.php may make it hard to see if its not turned on
__________________
Tanguy 0x7a69 inc. Programmer/President/CEO
http://www.0x7a69.com
A Leader in Programming since 1996
PHP, Ruby on Rails, MySQL, PCI DSS, and any Technical Consulting
myneid is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2011, 05:33 PM   #3
CYF
Coupon Guru
 
CYF's Avatar
 
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
Quote:
Originally Posted by myneid View Post
what is the problem? what is it not doing?
is mod rewrite on on your server? seems sending errordocument 404 to index.php may make it hard to see if its not turned on
it's a coupon script. Kind of a retailmenot clone. Front page lists popular coupons and stores. Clicking on a coupon is supposed to open the website of whatever company the coupon is for, but the script is redirecting to the index page. Clicking a store name is supposed to open a page on my site listing the coupons for that website/store, but it opens the index page again. Also going to /admin is supposed to open the admin area but once again, it opens the main index.php.

mod_rewrite is indeed installed, I am using it on a wordpress blog.

If I put gibberish in the .htaccess file then I get an internal server error.
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

CYF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2011, 06:04 PM   #4
pornophobic
Registered User
 
Industry Role:
Join Date: Jan 2011
Location: Lurking in the shadows..
Posts: 2
Quote:
Originally Posted by CYF View Post
... Also going to /admin is supposed to open the admin area but once again, it opens the main index.php.
What happens when you comment out
Code:
ErrorDocument 404 /index.php
?
Do you get a 404 error page?
Is the script in a site root, or in a directory?

If your script is in a directory you could try putting the directory name in front of the /index.php like so:
Code:
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /coupondir/index.php/$1 [L]
Not sure if it will work, hope it helps though.
pornophobic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2011, 06:22 PM   #5
CYF
Coupon Guru
 
CYF's Avatar
 
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
Quote:
Originally Posted by pornophobic View Post
What happens when you comment out
Code:
ErrorDocument 404 /index.php
?
Do you get a 404 error page?
No, nothing changes when I remove that from the htaccess

Quote:
Is the script in a site root, or in a directory?
they're in a subdirectory.

Quote:
If your script is in a directory you could try putting the directory name in front of the /index.php like so:
Code:
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /coupondir/index.php/$1 [L]
Not sure if it will work, hope it helps though.
Thanks for the suggestion, but that doesn't appear to have any change.

welcome to gfy
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

CYF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2011, 09:01 PM   #6
CYF
Coupon Guru
 
CYF's Avatar
 
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
any other ideas? I'm really stumped on this.
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

CYF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-25-2011, 11:08 PM   #7
CYF
Coupon Guru
 
CYF's Avatar
 
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
I tried installing the script on my amerinoc shared hosting. The script worked for the most part but I had an mysql error on the sidebar.

Seems to be related to the htaccess issue on the freebsd dedicated server, but mod_rewrite is enabled and running.

any ideas?
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

CYF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-26-2011, 12:10 AM   #8
cooldude7
Confirmed User
 
cooldude7's Avatar
 
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
i dont know much but u should try with freeelancer, they know a lot.

Last edited by cooldude7; 01-26-2011 at 12:17 AM..
cooldude7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-26-2011, 12:20 AM   #9
cooldude7
Confirmed User
 
cooldude7's Avatar
 
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
add this

Options +FollowSymLinks


before
RewriteEngine On
cooldude7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-26-2011, 12:37 AM   #10
CYF
Coupon Guru
 
CYF's Avatar
 
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
Quote:
Originally Posted by cooldude7 View Post
add this

Options +FollowSymLinks


before
RewriteEngine On
thanks for the suggestion, I've tried that but it doesn't seem to help.
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

CYF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-26-2011, 01:09 AM   #11
marlboroack
So Fucking Banned
 
Industry Role:
Join Date: Jul 2010
Location: ☣
Posts: 9,327
I wish i had skills like this. Never to late to learn i guess
marlboroack is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-26-2011, 11:32 AM   #12
CYF
Coupon Guru
 
CYF's Avatar
 
Industry Role:
Join Date: Mar 2009
Location: Minneapolis
Posts: 10,973
Quote:
Originally Posted by marlboroack View Post
I wish i had skills like this. Never to late to learn i guess
I'm digging into it by necessity at this point
__________________
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

CYF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-26-2011, 01:23 PM   #13
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
it would be more helpful if we knew something about the script/cms to make the modrewrite to work.

remember apache 1.3.x and 2.x.x has a diff rewrite system, some rules will work on 2.x.x and not in 1.3.x
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.