2
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by valonesal
0

Yes I will have more that one subfolder, outside of folder,folder,folder

As I mentioned I have worked on this for days now with no clue anything you can provide is appreciated.

0

URL rewrites are good for translating set patterns, for example:
www.site.com/products.php?catagory=1&product=32&viewmode=2

to:
www.site.com/products/cat1/item32/2

But if you are using unknown folder structures or varying structures, then it will not be suitable unless you have numerous (and probably complex) rewrite rules.
Also, if you want all files to translate to site.com/file.php then you will need to make sure that every single file has a unique name.

ReWrites are best used for SEO, to the end user they make little difference.

Edited by Will Gresham: n/a

0

Basically Im just using it to mask or remove the subfolders from the url so maybe it would be easier to just subtract certain folders from urls.

So rather than changing file names can we just subtract folder1,folder2 from all urls on my site? But still display page.

Is this possible if so how?

0

Could I use something like this for multiple files?

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/free($|/)
RewriteRule ^.*$ /paid/index.html [L]

Or This

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/(folder1|folder2|folder3).*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./folder1/folder2/index.php [L]

Edited by valonesal: n/a

0

Ok here is what I figured out, if I use

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/free($|/)
RewriteRule ^.*$ /paid/index.html [L]

and repeat the

RewriteCond %{REQUEST_URI} ^/free($|/)
RewriteRule ^.*$ /paid/index.html [L]

i can mask unlimited folders. If anyone has a better way please let me know.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.