removing index.php from urls

Cool tips and tricks about Jaws

removing index.php from urls

Postby afz » Wed May 21, 2008 4:17 am

before doing these steps, you must sure rewrite engine activated in your web service, for ex. in apache mod_rewrite must be enabled.

  1. in apache i use this htaccess lines and work for me:
    Code: Select all
    RewriteBase /

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
    </IfModule>

  2. set registry key /map/use_rewrite to true by using Registry gadget
afz
 
Posts: 529
Joined: Sat Apr 12, 2008 1:46 am

Re: removing index.php from urls

Postby standme » Sun May 25, 2008 1:43 am

I use this method but it can't work!
my computer: WinXP sp3, Apache/2.2.8, PHP/5.2.5, mysql/5.0.51a-community-nt. Jaws-0.8-beta2

Not Found
The requested URL /index.php/blog/show/music-from-movie.html was not found on this server.
standme
 
Posts: 4
Joined: Mon Apr 21, 2008 7:23 am

Postby alex » Sun Jun 15, 2008 12:58 am

Hmm, it works @ unix :)

Is on your Apache mod_rewrite active ?
It's possible that the mod_rewrite works on unix only because Windows use DLL's and Unix other modules in a other machine language, sorry, I don't know.
Regards / Gruß
alex
alex
 
Posts: 7
Joined: Sun Jun 15, 2008 12:45 am
Location: Germany, Deutschland

Re: removing index.php from urls

Postby simphax » Thu Feb 12, 2009 6:55 pm

Can't get this to work..
My phpinfo() (http://simphax.com/phpinfo.php) sais that mod_rewrite is on. My jaws testing ground is http://simphax.com/jaws/. I've acivated use_rewrite in the registry and have the following .htaccess-file:
# To use search engine friendly URLs check that mod_rewrite is enabled, and then copy
# this file to .htaccess
#

## Not Found
RewriteBase /
ErrorDocument 404 /index.php?error=404

# Encoding issues
AddType 'text/html; charset=UTF-8' html
AddType 'text/xml; charset=UTF-8' atom rss xml

#Options -ExecCGI +FollowSymLinks -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
simphax
 
Posts: 25
Joined: Mon Feb 09, 2009 5:55 pm
Location: Sweden

Re: removing index.php from urls

Postby afz » Thu Feb 12, 2009 7:29 pm

try this:
Code: Select all
RewriteBase /jaws/
ErrorDocument 404 /jaws/index.php?error=404

# Encoding issues
AddType 'text/html; charset=UTF-8' html
AddType 'text/xml; charset=UTF-8' atom rss xml

#Options -ExecCGI +FollowSymLinks -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [L]

    RewriteRule ^admin /jaws/admin.php [L]
    RewriteRule ^(.*)$ /jaws/index.php/$1 [L]
</IfModule>
afz
 
Posts: 529
Joined: Sat Apr 12, 2008 1:46 am

Re: removing index.php from urls

Postby simphax » Thu Feb 12, 2009 8:13 pm

afz wrote:try this:
Code: Select all
RewriteBase /jaws/
ErrorDocument 404 /jaws/index.php?error=404

# Encoding issues
AddType 'text/html; charset=UTF-8' html
AddType 'text/xml; charset=UTF-8' atom rss xml

#Options -ExecCGI +FollowSymLinks -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [L]

    RewriteRule ^admin /jaws/admin.php [L]
    RewriteRule ^(.*)$ /jaws/index.php/$1 [L]
</IfModule>

Ah of course :) Thank you so much! :D
simphax
 
Posts: 25
Joined: Mon Feb 09, 2009 5:55 pm
Location: Sweden

Re: removing index.php from urls

Postby dilbarjani » Fri Mar 06, 2009 3:09 pm

All jaws members please help me
i have done all the changes related to .htaccess and mod_rewrite is enabled but i got an error of 404 not found
dilbarjani
 
Posts: 5
Joined: Fri Mar 06, 2009 3:06 pm

Re: removing index.php from urls

Postby ieleja » Thu Nov 05, 2009 2:33 am

can't get this to work

(same server for each combination)

if Jaws is installed in subfolder, all works fine and index.php removes from urls

if Jaws is installed in root folder of VirtualHost, index.php is present in url

only changes in .htaccess file is at Rewritebase and RewriteRule lines

may be something wrong in my VirtualHost file:

Code: Select all
<VirtualHost *:80>
        ServerName www.domain.com
        ServerAlias domain.com
        ServerAdmin webmaster@domain.com
        ServerSignature Off

        DocumentRoot /var/www-domain/
        <Directory /var/www-domain/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        LogLevel warn
        ErrorLog /var/log/apache2/domain-error.log
        CustomLog /var/log/apache2/domain-access.log combined
</VirtualHost>


(in registery map/rewrite = true)
ieleja
 
Posts: 2
Joined: Sun Jul 05, 2009 12:21 am


Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 1 guest

cron