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

 Mod ReWrite help for search engine friendly pages
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
cliftonarms
Junior WebHelper
Junior WebHelper


Joined: 09 Feb 2004
Posts: 1

PostPosted: Mon Feb 09, 2004 11:33 am (13 years, 10 months ago) Reply with QuoteBack to Top

To enable complete deep indexing of our site I am "playing" with the linux ReWrite rule and creating a search engine only site map of my dynamic pages. This is because only a few of the major search engines follow dynamically generated pages.

eg script.php?var1=100&var2=200
to script/query/var1/equal/200/and/var2/equal/200

I have a lot of different active scripts so the ReWrite rule must be non variable and script specific.

so far I have:

RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)/query/(.*)$ $1.php?$2
RewriteRule ^(.*)/equal/(.*)$ $1=$2 [N]
RewriteRule ^(.*)/and/(.*)$ $1&$2 [N]


Trouble is, the first ReWrite rule ( /query/ ) works fine, but the other 2 ( /equal/ + /and/) I cannot get to work for the life of me.

Can anyone please tell me where I am being stupid. If and when I get this going I'll post a how-to for it.

________________________________
Outsourcing your projects
Freelance finder
OfflineView User's ProfileFind all posts by cliftonarmsSend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Mon Feb 09, 2004 5:08 pm (13 years, 10 months ago) Reply with QuoteBack to Top

the easier thing to do would be something like:
Code:
RewriteEngine On
RewriteRule ^script/([0-9]+)/([0-9]+)/$ /script.php?var1=$1&var2=$2 [L,NC]


that should make http://whatever.com/script/1/4/ be treated as whatever.com/script.php?var1=2&var2=4 (assuming you only want numbers in the query string).

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend 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.050409 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme