PHP URL Routing or .htaccess

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
EnDLeSs
Forum Newbie
Posts: 2
Joined: Thu Jan 22, 2009 12:08 am

PHP URL Routing or .htaccess

Post by EnDLeSs »

I was just wondering, If you want to rewrite the urls on your CMS would you use PHP URL Routing or simply use the .htacess file?
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: PHP URL Routing or .htaccess

Post by JAB Creations »

I hate WordPress but this works though not on localhost for me. Hopefully this will work for you...

Code: Select all

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
 
# END WordPress
Post Reply