Help with SEO and a remove index.php script I use

New to mod_rewrite? This is a good place to start.

Help with SEO and a remove index.php script I use

Postby inet-logic » Thu Jan 05, 2006 5:20 am


I am very new to this but I stepped into it thinking I could gain knowledge fast and then i came here and found these forums are awesome so I thought i would ask ya'll for some help.

I use a CMS and they used an method to remove index.php that didnt work on most servers. So I built a new way

Code: Select all
RewriteEngine On
RewriteRule ^favicon\.ico - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

Now that works great, now somone need to make sure that www was missing from the URL so I built a rule for that

Code: Select all
RewriteCond %{HTTP_HOST} ^www\.my-domain\.com$ [NC]
RewriteRule ^.*${REQUEST_URI} [R=301,L]

Now the same person needs to make sure that if index.php is still in the URL it gets redirecting to a URL without index.php in it and that HTACCESS and MOD_REWRITE still process the URL as a /index.php/$1 compatible url is that possible?

I guess what im trying to say is ... late_name/

should be

but still parse as ... late_name/ underneath it all :)
Posts: 3
Joined: Thu Jan 05, 2006 5:14 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 7 guests