Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-04-2012, 03:50 PM   PM User | #1
AntonyO
New to the CF scene

 
Join Date: May 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
AntonyO is an unknown quantity at this point
Exclamation htaccess modrewrite and SEO URLS

I need help with my htaccess file to work with a shared SSL and modrewrite ( SEO URLS ). The problem is that I am getting an error saying the index.php cannot be found when I try to use the shared SSL server, All is OK when accessing the site through normal non SSL way.

Details As Follows : ( Example Domain )

SEO URL : www.mydomain/component-test-id-1.html

NORMAL NON-SEO URL www.mydomain/index.php?component=test&id=1

NORMAL DOMAIN : http://www.mydomain.com/

SSL DOMAIN : https://web224.secure-serve.co.uk/mydomain.com/

PROBLEM SEO SSL URL : https://web224.secure-serve.co.uk/my...test-id-1.html

WORKING NON-SEO SSL URL : https://web224.secure-serve.co.uk/my...nent=test&id=1

HTACCESS FILE :

Code:
SetEnv DEFAULT_PHP_VERSION 53
DirectoryIndex index.php index.php3 index.html index.htm index.cgi
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On########## Begin - Rewrite rules to block out some common exploits    
# 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 <script> 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
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.css|\.js|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com [NC]
RewriteRule \.(jpe?g¦gif¦png¦bmp)$ - [F]
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 6 month"
ExpiresByType image/jpeg "access 6 month"
ExpiresByType image/gif "access 6 month"
ExpiresByType image/png "access 6 month"
ExpiresByType image/x-icon "access 6 month"
ExpiresByType image/ico "access 6 month"
ExpiresByType text/css "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresDefault "access 1 month"
</IfModule>
FileETag MTime Size
Any help would be great.

Thanks
AntonyO is offline   Reply With Quote
Reply

Bookmarks

Tags
htaccess, modrewrite, seo

Jump To Top of Thread


Thread Tools
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 not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:33 AM.


Advertisement
Log in to turn off these ads.