|
|
#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? |
|
|
|
|
|
#2 (permalink) |
|
Skittles
Super #1
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. |
|
|
|
|
|
#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 |
|
|
|
|
|
#5 (permalink) | |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
924 posts
Gave thanks: 2
Thanked 91 times
|
Quote:
Code:
RewriteRule test.html http://www.google.com Code:
RewriteRule ^test.html?$ http://www.google.com [NC]
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|
|
|
#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.
|
|
|
|