-1

I'm sure this has been asked in other forms, but I can't for the likes of me get this thing working after googling/trying for hours.

I have a bunch of URLs like this:

www.yoursite.com/pic_box.php?pic=$

What I want is that all URLs will only be avaiable with clean URLs.

www.yoursite.com/your-title-here

Can any htaccess master help me with this?

Jon Lin
  • 142,182
  • 29
  • 220
  • 220

2 Answers2

0

In your .htaccess:

RewriteEngine on
RewriteRule ^picbox/(.*)$ /pic_box.php?pic=$1 [NC,L]

Will give you the ability to rename your url like that: www.yoursite.com/picbox/your-pic-id

jlareau
  • 2,860
  • 1
  • 17
  • 11
0

Try adding these rules to the htaccess file in your document root:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /pic_box.php?pic=$1 [L]
Jon Lin
  • 142,182
  • 29
  • 220
  • 220