g1smd

msg:4446207 | 8:55 pm on Apr 26, 2012 (gmt 0) |
There's multiple problems with your rules. Literal periods in patterns should be escaped. The redirect target should contain the protocol and domain name. The internal rewrite should include the [L] flag. Why are you adding a slash to the URLs for pages? URLs ending with a slash are for folders. Add a blank line after each RewriteRule so you can clearly see what code is grouped together.
|
drooh

msg:4446216 | 9:05 pm on Apr 26, 2012 (gmt 0) |
Do you mean like this RewriteCond %{HTTP_HOST} ^http://experiencetejas\.com$ [L] as for slashes i like all the URLs to look like website.com/about/ and not website.com/about
|
g1smd

msg:4446233 | 9:28 pm on Apr 26, 2012 (gmt 0) |
Use a trailing slash only when the URL is for a folder or the index page in a folder. Make sure too that you use URLs beginning with a leading slash in the links to other pages of your site.
|
drooh

msg:4446242 | 9:53 pm on Apr 26, 2012 (gmt 0) |
can you comment on this RewriteCond %{HTTP_HOST} ^http://experiencetejas\.com$ [L]
|
drooh

msg:4446252 | 10:00 pm on Apr 26, 2012 (gmt 0) |
whenever I put the [L] in there I get a 500 Internal server error, also I need to remind you this is only happening on Godaddy shared hosting
|
g1smd

msg:4446260 | 10:07 pm on Apr 26, 2012 (gmt 0) |
The [L] flag belongs on the RewriteRule that will follow the RewriteCond, not on the RewriteCond itself. Add a blank line after each RewriteRule in order to make the code clearer to read.
|
drooh

msg:4446268 | 10:16 pm on Apr 26, 2012 (gmt 0) |
Well I've been fooling with this all day and I can not get it to work. Simply put, the rewrite is affecting admin.website.com and I dont want it to! Again, here is where I am RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?experiencetejas\.com$ [NC] RewriteRule ^([a-z0-9_-]+)$ /$1/ [R=301,L] RewriteRule ^([a-z0-9_-]+)/$ /index.php?page_name=$1 [NC,QSA]
|
g1smd

msg:4446295 | 11:13 pm on Apr 26, 2012 (gmt 0) |
The redirect target should contain the protocol and domain name. The internal rewrite should include the [L] flag.
|
lucy24

msg:4446298 | 11:19 pm on Apr 26, 2012 (gmt 0) |
RewriteCond %{HTTP_HOST} ^experiencetejas.com$ RewriteRule ^([a-z0-9_-]+)$ /$1/ [R=301,L] RewriteRule ^([a-z0-9_-]+)/$ /index.php?page_name=$1 |
| I have to say this line-spacing makes me uneasy. It makes it look as if you expect the Condition to apply to both of the following Rules. For clarity, it should be RewriteCond %{HTTP_HOST} ^example.com$ RewriteRule ^([a-z0-9_-]+)$ /$1/ [R=301,L] RewriteRule ^([a-z0-9_-]+)/$ /index.php?page_name=$1 ... plus all other appropriate changes to the Rules themselves as laid out in g1's posts.
|
|