Welcome Guest, Not a member yet? Register   Sign In
cjax mode_rewrite problem
#1

[eluser]soufiaane[/eluser]
hi everyone i'm having trouble setting up a .htaccess to use friendly urls for codeigniter to remove index.php & in the same time use friendly urls with cjax framework

this is my current .haccess file

Code:
Options -Indexes
RewriteEngine on

RewriteCond $1 !^(index\.php|assets/|font/|bootstrap/|cjax/|robots\.txt|ajaxfw\.php|ajax\.php)

RewriteRule ^(.*)$ index.php/$1 [L]
#2

[eluser]InsiteFX[/eluser]
Code:
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php

RewriteEngine On
#RewriteBase /

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

[eluser]soufiaane[/eluser]
thank you InsiteFX but it didn' work for the cjax controllers !
i still have to use the ajax.php?test/test indtead of ajax/test/test/ url
#4

[eluser]InsiteFX[/eluser]
Try this from what you posted above but I changed.
Code:
Options -Indexes
RewriteEngine on

RewriteCond $1 !^(index\.php|assets|font|bootstrap|cjax|robots\.txt|ajaxfw\.php|ajax\.php)

RewriteRule ^(.*)$ index.php/$1 [L]
#5

[eluser]Ajaxboy[/eluser]
There is a file htaccess.txt that comes included in the zip and contains:


Code:
RewriteRule  ^/?ajax/(.*)$ ajax.php?$1 [NC,QSA,L]

Combine this with your existing htaccess

Eg:

Code:
Options -Indexes
RewriteEngine on

RewriteRule  ^/?ajax/(.*)$ ajax.php?$1 [QSA,L]

RewriteCond $1 !^(index\.php|assets|font|bootstrap|cjax|robots\.txt|ajaxfw\.php|ajax\.php)

RewriteRule ^(.*)$ index.php/$1 [L]
#6

[eluser]soufiaane[/eluser]
thank you InsiteFX & Ajaxboy for your help .
Ajaxboy's answer did work Smile




Theme © iAndrew 2016 - Forum software by © MyBB