Jump to content

Mod_rewrite help


voyde

Recommended Posts

I got most of it, however when it comes to a file name i am having some problems...

 

.htaccess:

Options +FollowSymLinks

RewriteEngine On

rewriteRule ^([A-Za-z]+)/?$ index.php?p=$1 [L]

rewriteRule ^([A-Za-z]+)-([A-Za-z]+)/?$ index.php?p=$1&type=$2 [L]

rewriteRule ^([A-Za-z]+)-([A-Za-z]+)/([*.])$ index.php?p=$1&type=$2&file=$3 [L]

 

The url used to look like:

http://www.thesite.com/p=page&type=images&file=file.RAR

 

with the above mod_rewrite:

http://www.thesite.com/page-images/

 

but when i need to put a file in...

http://www.thesite.com/page-images/file.RAR

page not found or file missing.

 

i need the full file name but cant figure it out.

 

thanks.

 

(P.S I have searched google high and low)

 

 

Link to comment
https://forums.phpfreaks.com/topic/67717-mod_rewrite-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.