shaistar
New Member
- Messages
- 25
- Reaction score
- 1
- Points
- 0
I'm slightly (ok very, very, very) annoyed and frustrated with my .htaccess file. I'm trying to do seo rewrites on my dynamic urls for 4 friggin' days! (Deep Breath) For example,
www.example.co.cc/index.php(default displays ?page=home) to www.example.co.cc/random-phrase-here in my html it maps to <a href="/random-phrase-here">
www.example.co.cc/index.php?page=cookies to www.example.co.cc/cookies in my html it maps to <a href="/cookies">
www.example.co.cc/index.php?section=acategory&page=there-are-8 to
www.example.co.cc/random-phrase-here/acategory/there-are-8 in my html it maps to <a href="/random-phrase-here/category/there-are-8">
www.example.co.cc/index.php?section=letsgoto&page=place to www.example.co.cc/lets-go-somewhere/place in my html it maps to <a href="/lets-go-somewhere/place">
Here's a copy and paste of the all the crap I've tried from the internet and what is currently in my .htaccess commented:
#<IfModule mod_rewrite.c>
#Options +FollowSymLinks
#RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/?$ index.php [QSA]
RewriteRule ^(.*)/?$ index.php?page=$1 [QSA,L]
# RewriteRule ^pattern/?$ substitution [optional flags]
RewriteRule ^(.+)$ /index.php?$1 [QSA,L]
#RewriteRule ^/(.*)$ /index.php [QSA]
#RewriteRule ^/(.*)/(.*)$ /index.php?page=$1 [QSA]
#RewriteRule ^/random-phrase-here/?$ /index.php [QSA,NC,L]
#RewriteRule ^/lets-go-somewhere/(.*)$ ?section=letsgoto&page=$1 [QSA,NC,L]
#RewriteRule ^(.*)/(.*)/?$ /index.php?section=$1&page=$2 [QSA,NC,L]
#RewriteRule ^(.*)/?$ index.php?page=$1 [NC,L]
#</IfModule>
*Sigh* and none of that crap works. Basically what I've got going is an index.php file that includes based on the get variable in the url. At one point in time I managed to get the url rewritten the only problem was the file that should of been included only brought up the default ?page=home page. If you need to see my php file I can do that it's just this post is getting lengthy, I just wanted to make sure you ( o, gracious helper person) had enough infor to help me out. Descalzo tried to help me but the code I was supplemented with didn't work or it did and I just don't know how to use it. I'm rambling. Thanks for your help in advance
-Shaistar
www.example.co.cc/index.php(default displays ?page=home) to www.example.co.cc/random-phrase-here in my html it maps to <a href="/random-phrase-here">
www.example.co.cc/index.php?page=cookies to www.example.co.cc/cookies in my html it maps to <a href="/cookies">
www.example.co.cc/index.php?section=acategory&page=there-are-8 to
www.example.co.cc/random-phrase-here/acategory/there-are-8 in my html it maps to <a href="/random-phrase-here/category/there-are-8">
www.example.co.cc/index.php?section=letsgoto&page=place to www.example.co.cc/lets-go-somewhere/place in my html it maps to <a href="/lets-go-somewhere/place">
Here's a copy and paste of the all the crap I've tried from the internet and what is currently in my .htaccess commented:
#<IfModule mod_rewrite.c>
#Options +FollowSymLinks
#RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/?$ index.php [QSA]
RewriteRule ^(.*)/?$ index.php?page=$1 [QSA,L]
# RewriteRule ^pattern/?$ substitution [optional flags]
RewriteRule ^(.+)$ /index.php?$1 [QSA,L]
#RewriteRule ^/(.*)$ /index.php [QSA]
#RewriteRule ^/(.*)/(.*)$ /index.php?page=$1 [QSA]
#RewriteRule ^/random-phrase-here/?$ /index.php [QSA,NC,L]
#RewriteRule ^/lets-go-somewhere/(.*)$ ?section=letsgoto&page=$1 [QSA,NC,L]
#RewriteRule ^(.*)/(.*)/?$ /index.php?section=$1&page=$2 [QSA,NC,L]
#RewriteRule ^(.*)/?$ index.php?page=$1 [NC,L]
#</IfModule>
*Sigh* and none of that crap works. Basically what I've got going is an index.php file that includes based on the get variable in the url. At one point in time I managed to get the url rewritten the only problem was the file that should of been included only brought up the default ?page=home page. If you need to see my php file I can do that it's just this post is getting lengthy, I just wanted to make sure you ( o, gracious helper person) had enough infor to help me out. Descalzo tried to help me but the code I was supplemented with didn't work or it did and I just don't know how to use it. I'm rambling. Thanks for your help in advance
-Shaistar
Last edited: