help with rewrite

Discuss practical ways rearrange URLs using mod_rewrite.

Postby richardk » Sat Aug 16, 2008 3:15 pm

The other mod_rewrite code is not what you want.

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule browse-cattery-([0-9]+)\.html /index.php?page=browse&category=$1 [QSA,L]

Also try replacing QSA with R.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby bender » Sat Aug 16, 2008 3:23 pm

I tried it both ways. Still no change. I have been reading alot, thanks for all the info by the way, the way you are stating seems right according to the info here. It just doesn't work. I have one site running on the same server, it uses mod-rewrite as well and works fine..... I am out of ideas I guess.

bender
bender
 
Posts: 13
Joined: Sat Aug 09, 2008 9:23 pm

Postby richardk » Sat Aug 16, 2008 3:33 pm

What URL are you going to?
Do you have a file called "browse" something (eg. browse.html)?
Do you have any other mod_rewrite?

Try
Code: Select all
Options +FollowSymLinks -MultiViews

RewriteEngine On

RewriteRule browse-cattery-([^/]+)\.html /index.php?page=browse&category=$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby bender » Sat Aug 16, 2008 3:39 pm

I have a browse.php which runs through another php file and produces
Code: Select all
index.php?page=browse&category=1


the -MultiViews didn't seem to work.
bender
bender
 
Posts: 13
Joined: Sat Aug 09, 2008 9:23 pm

Postby richardk » Sat Aug 16, 2008 4:05 pm

If you rename browse.php, does it work (or at least do something different)?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby bender » Sat Aug 16, 2008 4:17 pm

it wouldn't work. the way the index.php and others are written, they require browse.php, they have include(browse.php) written in to them.

bender
bender
 
Posts: 13
Joined: Sat Aug 09, 2008 9:23 pm

Postby bender » Sat Aug 16, 2008 7:36 pm

ok, I added some php until i got what the .htaccess was looking for. problem solved for now. Thanks to everybody, richardk mainly, for the help and how to's.

bender
bender
 
Posts: 13
Joined: Sat Aug 09, 2008 9:23 pm

Previous

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: Google [Bot] and 24 guests

cron