icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.
Old November 24th, 2007, 6:38 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Mar 2007
11 posts
Gave thanks: 1
Thanked 0 times
mod_rewrite

Trying to get SEF friendly urls with Joomla. When I change option in global config I get the right urls but with not found errors all over the place. Forums say it is a mod_rewrite issue but Surpass insists mod_rewrite it on... I put the following code in my htaccess file to test:

RewriteEngine On
Options +FollowSymLinks
Redirect /test.html http://www.google.com

and then when I go to http://www.broughtonstreet.com/test/html I get the error (instead of the redirect)

Not Found

The requested URL /test.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


where do I look next?
uwwandrew is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 24th, 2007, 7:24 PM   #2 (permalink)
Skittles
Super #1
 
DewKnight's Avatar
 
Joined in Aug 2004
Lives in Space ship
Hosted on dedi
6,480 posts
Gave thanks: 91
Thanked 176 times
Have you pointed support to that htaccess file? Was there anything else in the file?
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people.
DewKnight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 24th, 2007, 7:39 PM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Mar 2007
11 posts
Gave thanks: 1
Thanked 0 times
I did not show it to them...not that I didn't want to it just somehow did not seem like their job.

# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section


########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
uwwandrew is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 7th, 2008, 2:30 PM   #4 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2007
2 posts
Gave thanks: 0
Thanked 0 times
Same problem here, did you solve your problem?
TinkyWinky is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 8th, 2008, 8:44 AM   #5 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
924 posts
Gave thanks: 2
Thanked 91 times
Quote:
Originally Posted by uwwandrew View Post
... I put the following code in my htaccess file to test:

RewriteEngine On
Options +FollowSymLinks
Redirect /test.html http://www.google.com

...
Should be:

Code:
RewriteRule test.html http://www.google.com
for any test.html file in any subsequent directory with or without any GET string, or,

Code:
RewriteRule ^test.html?$ http://www.google.com [NC]
to limit to domain/test.html or domain/test.htm only; caps or lowercase.
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 12th, 2008, 7:16 PM   #6 (permalink)
Registered User
Seasoned Poster
 
Joined in Oct 2007
54 posts
Gave thanks: 3
Thanked 3 times
On my Joomla site (trenttompkins.com) I use the sh404SEF component which you can get at extensions.Siliana.net. Technically, it lets you use SE friendly links without mod_rewrite, but I always turn mod_rewrite on, and don't have any problems with the setup.
tibberous is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 12th, 2008, 9:07 PM   #7 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2007
2 posts
Gave thanks: 0
Thanked 0 times
Wink

SEF options also worked on my Joomla but it didn't work on my SMF forum. Until tonight! I don't know what is changed but I'm happy now
TinkyWinky is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On