GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   htaccess help needed (https://gfy.com/showthread.php?t=1007547)

CYF 01-25-2011 05:07 PM

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>

myneid 01-25-2011 05:25 PM

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

CYF 01-25-2011 05:33 PM

Quote:

Originally Posted by myneid (Post 17869289)
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.

pornophobic 01-25-2011 06:04 PM

Quote:

Originally Posted by CYF (Post 17869306)
... 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.

CYF 01-25-2011 06:22 PM

Quote:

Originally Posted by pornophobic (Post 17869368)
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 :thumbsup

CYF 01-25-2011 09:01 PM

any other ideas? I'm really stumped on this.

CYF 01-25-2011 11:08 PM

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? :)

cooldude7 01-26-2011 12:10 AM

i dont know much but u should try with freeelancer, they know a lot.

cooldude7 01-26-2011 12:20 AM

add this

Options +FollowSymLinks


before
RewriteEngine On

CYF 01-26-2011 12:37 AM

Quote:

Originally Posted by cooldude7 (Post 17869856)
add this

Options +FollowSymLinks


before
RewriteEngine On

thanks for the suggestion, I've tried that but it doesn't seem to help.

marlboroack 01-26-2011 01:09 AM

I wish i had skills like this. Never to late to learn i guess :pimp

CYF 01-26-2011 11:32 AM

Quote:

Originally Posted by marlboroack (Post 17869917)
I wish i had skills like this. Never to late to learn i guess :pimp

I'm digging into it by necessity at this point :1orglaugh

fris 01-26-2011 01:23 PM

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


All times are GMT -7. The time now is 01:28 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123