Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - raseone

#1
I've set up a set of conditions & rules for a new website & I've found myself needing to combine rules that are in conflict.

## STRIP UNWANTED QUERY STRINGS FROM ALL BUT EXEMPTED FILES ##
RewriteCond %{query_string} .
RewriteCond %{THE_REQUEST} !^.*\/item\.php?(.*)
RewriteCond %{THE_REQUEST} !^.*\/free_item\.php?(.*)
RewriteRule (.*) /$1? [R=301,L]

## PRETTY URLS FOR DYNAMIC PAGES  V2 ##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9]+)$ item.php?font=$1
RewriteRule ^([a-zA-Z0-9]+)/$ item.php?font=$1

Each of these works fine on their own & both play nice with all the other rules in the file. I'm a bit stumped as to why there is a conflict.

When these 2 are used together I get http://example.com/item.php with no parameter.

Looks like the first bit is stripping the query even though the file is exempted.

Any help would be greatly appreciated.

More About Our Webmaster Tools for Windows and Mac

HTML, image, video and hreflang XML sitemap generatorA1 Sitemap Generator
      
website analysis spider tool for technical SEOA1 Website Analyzer
      
SEO tools for managing keywords and keyword listsA1 Keyword Research
      
complete website copier toolA1 Website Download
      
create custom website search enginesA1 Website Search Engine
      
scrape data into CSV, SQL and databasesA1 Website Scraper