![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2006
Posts: 1
Rep Power: 0
![]() |
Apache Mod Rewrite Help
Hello,
I was hoping somebody can help me. This mod rewrite for my auction site. It works great, however I was wondering if it's possible to remove the "Category/" part before each url. With the mod rewrite the urls look like this http://www.mysite.com/Category/Cell_Phones/ I was just hoping there is a way to remove the "Category" part of the url so that the urls would read like this http://www.mysite.com/Cell_Phones/ Is this possible with the rule below? I have tried but was unsuccessful. I got it to the point where everything was working except the CSS and images weren't appearing. Can someone help? Thanks in advance! # Browse auction RewriteRule ^Category/.*/[^/]+\_([0-9]+).html+$ index.php?a=1002&b=$1 # Browse auctions by category RewriteRule ^Category/([^/]+/?[^/]+)/$ index.php?a=1005&b=$1&c= RewriteRule ^Category/([^/]+/?[^/]+)/\?Browse=([^&]+)$ index.php?a=1005&b=$1&c=$2 RewriteRule ^Category/.*((images|css)/[^.]+\.[a-z]+)$ $1 RewriteRule ^Category/.*/([^/]+\.[a-z]+)$ $1 |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Apr 2006
Posts: 1
Rep Power: 0
![]() |
Writing the ModRewrite rules is the easy part, you would use something like:
RewriteRule ^/.*/[^/]+\_([0-9]+).html+$ index.php?a=1002&b=$1 the rules are ignoring the "Category" part of the string anyway. The more difficult task would be getting the site to leave the "Category" off of every URL string. For SEO purposes this is a good idea as spiders will find the page closer to the root and therefore expect it to be of higher value. -Travis http://www.bestcodingpractices.com |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|