NameSilo

Htaccess help needed

Spaceship Spaceship
Watch
This .htaccess works on my linux shared host, but not my freebsd dedicated server. FreeBSD server is freebsd 8.1 with php5.3.5, mysql5.1.54, apache-2.2.17, and php5-extensions installed. And yes, mod_rewrite is loaded and working already :)

Any help is appreciated :)

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]
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
The first thing which comes into my mind is that you should try to disable multiviews by adding following code into your .htaccess file:
Code:
[B]Options -MultiViews[/B]

RewriteEngine On
...

Actually, multiviews might be already disabled by the apache configuration and therefore may not be the cause of the problem, but I think it's worth to try. :)
 
0
•••
un4given[MAD];4038775 said:
The first thing which comes into my mind is that you should try to disable multiviews by adding following code into your .htaccess file:
Code:
[B]Options -MultiViews[/B]

RewriteEngine On
...

Actually, multiviews might be already disabled by the apache configuration and therefore may not be the cause of the problem, but I think it's worth to try. :)

I tried your suggestion but it had no effect.

Any other suggestions? I appreciate the help :)
 
0
•••
Try

Options +FollowSymLinks​

In the beginning of the file.

If it's working without it on the shared host, it's probably because it's enabled at the server level.
 
0
•••
Okay... How exactly is it not working?
Is it not working as expected or you just receive '500 internal server error' message?

You may also enable logging for rewrites (see options RewriteLog and RewriteLogLevel in httpd.conf or in vhosts.conf) and analyze logs to locate the problem.
 
0
•••
Try

Options +FollowSymLinks​

In the beginning of the file.

If it's working without it on the shared host, it's probably because it's enabled at the server level.

I've tried it with that also, and I believe it's enabled in my config.

un4given[MAD];4038904 said:
Okay... How exactly is it not working?
Is it not working as expected or you just receive '500 internal server error' message?

You may also enable logging for rewrites (see options RewriteLog and RewriteLogLevel in httpd.conf or in vhosts.conf) and analyze logs to locate the problem.

It's not working as expected.

This is for a coupon site, like a retailmenot clone. The index.php loads and works fine. When you click on a coupon, it is supposed to send you to bestbuy.com or where ever, but instead it loads the main index.php. When you click on a store name, it's supposed to open a second page on my site listing all the coupons for that store, but instead it loads the index.php. /admin is supposed to be the admin area, but once again it loads the main index.php site.

I enabled error logging last night, I will try to copy and paste some of it.



Thanks!
 
Last edited:
0
•••
Is it possible to view source code of index.php? You can send it to me via PM, if you don't want to publish it here.
 
1
•••
un4given[MAD];4039288 said:
Is it possible to view source code of index.php? You can send it to me via PM, if you don't want to publish it here.

I will send over the main /index.php and also the coupon/index.php via PM.

I reallly appreciate the help :)

---------- Post added at 03:45 PM ---------- Previous post was at 02:12 PM ----------

un4given[MAD],

The problem wasn't with the htaccess.

Thank you for pointing me in the right direction, the problem was with the codeignitor configuration files. Your suggestion pointed me in the right direction and I was able to figure it out :)

Positive rep added.

Thanks :)
 
0
•••
0
•••
some thing new i have picked up from this thread. i am little bit confused with the rewrite codes but i really enjoyed the thread.
 
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back