eranhazout
asked on
need some help with rewrite rule
Hi
I need some help with configuring the right conditions for rewrite rule.
Current status:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^gurushots.com [nc]
rewriterule ^(.*)$ http://www.gurushots.com/$1 [r=301,nc]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^index\.php$ "http\:\/\/www\.gurushots\ .com" [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^pro-p/([a-zA-Z0-9_-]+)/?$ /pro-profile.php?n=$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]+)/?$ /pro-full-profile.php?n=$1
I would like to add to more rules:
our website is providing professional photo critique.
1. I need to add category rule : www.site.com/photo-critique/category-name/
these should point to photo-critique-categories. php?n=category-name
2. and also point to specific critique: www.site.com/photo-critique/category-name/critique-name
these should point to photo-critique-by-name.php ?n=critique-name
thank you
I need some help with configuring the right conditions for rewrite rule.
Current status:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^gurushots.com [nc]
rewriterule ^(.*)$ http://www.gurushots.com/$1 [r=301,nc]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^index\.php$ "http\:\/\/www\.gurushots\
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^pro-p/([a-zA-Z0-9_-]+)/?$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]+)/?$ /pro-full-profile.php?n=$1
I would like to add to more rules:
our website is providing professional photo critique.
1. I need to add category rule : www.site.com/photo-critique/category-name/
these should point to photo-critique-categories.
2. and also point to specific critique: www.site.com/photo-critique/category-name/critique-name
these should point to photo-critique-by-name.php
thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can see the site or tell me what is the address that gives you a 404 error
one question.. the files
photo-critique-categories. php
photo-critique-by-name.php
are under the root of the site ?
one question.. the files
photo-critique-categories.
photo-critique-by-name.php
are under the root of the site ?
ASKER
yes they are under the root.
even if I try to open directly to the page by hand gives me the error ..
http://www.gurushots.com/photo-critique-categories.php?n=Animal% 20Photography
http://www.gurushots.com/photo-critique-categories.php
They are correct two links
http://www.gurushots.com/photo-critique-categories.php?n=Animal% 20Photography
http://www.gurushots.com/photo-critique-categories.php
They are correct two links
even if I try to open directly to the page by hand gives me the error ..
http://www.gurushots.com/photo-critique-categories.php?n=Animal%20Photography
http://www.gurushots.com/photo-critique-categories.php
They are correct two links
http://www.gurushots.com/photo-critique-categories.php?n=Animal%20Photography
http://www.gurushots.com/photo-critique-categories.php
They are correct two links
ASKER
Hi
it is not the right website, I'm using our development website.
please try on http://www.gurushots.info/photo-critique-categories.php?n=Animal%
it is not the right website, I'm using our development website.
please try on http://www.gurushots.info/photo-critique-categories.php?n=Animal%
ASKER
thank you for you comment but it is not working, I get 404 page not found ... when i'm trying to test the rule