View Full Version : directory style URLs htaccess help?
Fugato
02-10-2008, 08:37 PM
I really need to change my URLs to directory style ones.
What is the HTACCESS code to change
mysite.com/product20392.php to
mysite.com/product20392?
Regards
Jake
scottish
02-10-2008, 08:48 PM
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.php\ HTTP
RewriteRule (.*)\.php$ $1 [R=301]
?
Fugato
02-10-2008, 09:00 PM
How can I then make it pull content from /product20392.php ?
scottish
02-10-2008, 09:06 PM
I ain't got hosting atm so i can't test this but try;
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}!-d
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^.]+)\.php$ $1 [L]
Fugato
02-10-2008, 09:07 PM
with or without the code before?
500 error too
scottish
02-10-2008, 09:08 PM
Without :P
Fugato
02-10-2008, 09:09 PM
500 error.
scottish
02-10-2008, 09:09 PM
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
^ without previous code.
Fugato
02-10-2008, 09:10 PM
It's not removing .php!
But it pulls content.
scottish
02-10-2008, 09:11 PM
omg >.< 1 sec
Is this on btw?
Options +FollowSymLinks
(at top)
Fugato
02-10-2008, 09:19 PM
yup, it is!
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.