Rewrite Rule Help for a dynamic site ($ available for help)

Using mod_rewrite to handle various content issues

Rewrite Rule Help for a dynamic site ($ available for help)

Postby jdogg » Tue Jun 29, 2004 9:01 am

I have a client where we needed to make the URLS search engine friendly. To accomplish this, we are using Rewrite to take URLS that are requested as PHP and turn them into .html pages when they are sent back to the browser. A typical URL might look like this.

Current URL: www.website.com/Apple/Ibook/22/main.html

URL we want: www.website.com/Ibook/main.html

*Here we are sending the product ID, and the category Apple to tell MySQL what record it should use to populate the 'main.php' template.
The client would like to see the URL reduced a bit, this is where the trouble has been. They would rather see the rule written without the ID and Product Brand (Apple) being sent. Whenever we try to apply the new Rewrite Rule, we get a 'page not displayed error'.


If you know anyone who is an expert in Apache and URL Rewriting, I would be willing to pay up to $500 USD for someone to come up with a fix for the URL. Money would be sent upon successful re-write via PayPal.

Email: jlanier01@ameritech.net



RewriteEngine on

RewriteRule ^([a-z|A-Z]+)/([A-Z|a-z|0-9]+)/([0-9]+)/main$ main.php?id=$3 [T=application/x-httpd-php]

RewriteRule ^([a-z|A-Z]+)/([A-Z|a-z|0-9]+)/([0-9]+)/pricing$ view_pricing.php?id=$3 [T=application/x-httpd-php]

RewriteRule ^([a-z|A-Z]+)/([A-Z|a-z|0-9]+)/([0-9]+)/gallery$ view_gallery.php?id=$3 [T=application/x-httpd-php]

RewriteRule ^([a-z|A-Z|0-9]+)/([0-9]+)/category$ view_category.php?id=$2 [T=application/x-httpd-php]

RewriteRule ^([a-z|A-Z]+)/([a-z|A-Z|0-9]+)/([0-9]+)/specs$ view_specs.php?id=$3 [T=application/x-httpd-php]

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([a-z|A-Z]+)/([A-Z|a-z|0-9]+)/([0-9]+)/main.html$ main.php?id=$3 [T=application/x-httpd-php]

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([a-z|A-Z]+)/([A-Z|a-z|0-9]+)/([0-9]+)/pricing.html$ view_pricing.php?id=$3 [T=application/x-httpd-php]

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([a-z|A-Z]+)/([A-Z|a-z|0-9]+)/([0-9]+)/gallery.html$ view_gallery.php?id=$3 [T=application/x-httpd-php]

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([a-z|A-Z|0-9]+)/([0-9]+)/category.html$ view_category.php?id=$2 [T=application/x-httpd-php]

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([a-z|A-Z]+)/([A-Z|a-z|0-9]+)/([0-9]+)/specs.html$ view_specs.php?id=$3 [T=application/x-httpd-php]

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([a-z|A-Z]+)/([A-Z|a-z|0-9]+)/([0-9]+)/search.html$ search1.php? [T=application/x-httpd-php]
jdogg
 
Posts: 1
Joined: Tue Jun 29, 2004 8:50 am

Return to Content

Who is online

Users browsing this forum: No registered users and 1 guest

cron