0

After hours of research, reading Q&A, and rewriting my redirect code, I have not found a solution to what I thought would be a fairly easy thing to do.

I have this url http://example.com/page.php?slug=my-page-url

And this htaccess code

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ page.php?slug=$1 [L]

The result I would like is this http://example.com/my-page-url

Any idea what I am doing wrong? Thanks.

Tom Ford
  • 176
  • 10
  • What is it producing for you now? – Len_D Oct 05 '14 at 16:18
  • Nothing is being rewritten, same url as input http://example.com/page.php?slug=my-page-url – Tom Ford Oct 05 '14 at 16:18
  • `RewriteRule` works on the URL path, and the value always starts with a slash ("/") your above configuration will never match. – Guss Oct 05 '14 at 16:21
  • 1
    Thanks you deceze for linking your response, I got my issues solved immediately after changing the hyperlinks..I wish I found that answer 4 hours ago. – Tom Ford Oct 05 '14 at 16:35

0 Answers0