Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Hide/changing .php?=


HaloPlayer - 11:12 am on Oct 7, 2012 (gmt 0)


Oddly enough I have tried the rewrite and it just will not work for me, I've tried variations of it, I spent a good 2.5 hours fiddling around with it, found several other sites relating too it.

This is the code I am using:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^book/([0-9]+) /book.php?name=$1 [L]


The mod rewrite module is definetely installed on the server.

If I use this rewrite:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php


This will work fine in hiding the .php extension so I know these rewrites work on the server. Hiding the .php extension is what I am after but I am also after hiding the book?name= to make it /book/

What am I doing wrong?

[edited by: incrediBILL at 9:38 pm (utc) on Oct 7, 2012]
[edit reason] removed URLS, see TOS & Charter [/edit]


Thread source:: http://www.webmasterworld.com/apache/4501915.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com