4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 mod_rewrite specific question
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
zgpablo
Junior WebHelper
Junior WebHelper


Joined: 02 Nov 2004
Posts: 2
Location: Aspen, CO

PostPosted: Tue Nov 02, 2004 10:27 pm (12 years, 11 months ago) Reply with QuoteBack to Top

Hi,
I have read several posts on the whole mod_rewrite stuff and had a very specific use.

I have (what I thought was) a site with SEO friendly URL's but my SEO "specialist" is complaining that the 2nd level folders will kill all his hopes of high placement.

Here is what I have:
http://www.domain.com/pages/my-page-name-64.php
http://www.domain.com/categories/my-category-name-17.php
http://www.domain.com/products/my-product-name-23.php

pages, categories and products are pages without suffix's that collect the rest of the url for processing.

is there a mod_rewrite way I could change these URL's to

http://www.domain.com/page-my-page-name-64.php
http://www.domain.com/cat-my-category-name-17.php
http://www.domain.com/prod-my-product-name-23.php

Or something similar, hiding the folder (looking) names.

Thanks for any help I can get.
OfflineView User's ProfileFind all posts by zgpabloSend Personal MessageVisit Poster's Website
zgpablo
Junior WebHelper
Junior WebHelper


Joined: 02 Nov 2004
Posts: 2
Location: Aspen, CO

PostPosted: Tue Nov 02, 2004 11:38 pm (12 years, 11 months ago) Reply with QuoteBack to Top

For anyone looking for answers, this worked...

RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)p-(.*)$ $1products/$2
RewriteRule ^(.*)c-(.*)$ $1categories/$2
RewriteRule ^(.*)pag-(.*)$ $1pages/$2
OfflineView User's ProfileFind all posts by zgpabloSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.045456 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme