Welcome Guest, Not a member yet? Register   Sign In
Yet Another ReWrites from hell issue :(
#1

[eluser]Tim Nash[/eluser]
Ok like most peeps I seem to be struggling with remove the pesky index.php, I'm using Debian and Apache2 also currently not using .htaccess but did attempt to with similar no results.

My sites file looks like:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/public_html/*>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
# Rewrite Rules go here never use .htacess because it's not cached.
# It will save tons of resources, we promise.
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
AddOutputFilterByType DEFLATE text/html
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>


Now the good news no Server 500 message Smile the bad news pesky index.php is in place

Within config I have gone through all the combinations

$config['index_page'] = "";
$config['index_page'] = "index.php";

and the various options in $config['uri_protocol'] some result in simply 404 on all but the index page even using index.php/controller which makes sense if I remove the index.php however in no case does the system correctly rewrite ideas appreciated at this point, oh and mod rewrite is enabled.
#2

[eluser]pickupman[/eluser]
Not to ask a dumb question, but have you checked phpinfo() to see if mod_rewrite is compiled/setup for apache?
#3

[eluser]Tim Nash[/eluser]
not a dumb question but yes mod_rewrite is setup and enabled.
#4

[eluser]skunkbad[/eluser]
Sometimes the rewrite rule itself needs a question mark. You see this usage if you browse the forum. Worth a try.
#5

[eluser]Tim Nash[/eluser]
I don't use a ? in the normal structure but gave it a shot Sad nope
#6

[eluser]Tim Nash[/eluser]
ok finally, first off gave up trying to put it in my vhosts and cleared everything down and then created .htaccess with

RewriteEngine on
RewriteCond $1 !^(index\.php|js|css|images)
RewriteRule ^(.*)$ /index.php/$1 [L]
#7

[eluser]skunkbad[/eluser]
[quote author="Tim Nash" date="1275763161"]ok finally, first off gave up trying to put it in my vhosts and cleared everything down and then created .htaccess with

RewriteEngine on
RewriteCond $1 !^(index\.php|js|css|images)
RewriteRule ^(.*)$ /index.php/$1 [L][/quote]

Wonder why it wouldn't work in vhosts?




Theme © iAndrew 2016 - Forum software by © MyBB