Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> .htaccess problem z przekierowaniem linków
piotrekr
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 19.08.2011

Ostrzeżenie: (0%)
-----


Witam ,mam stronke w php którą kupiłem gotową , nieznam sięniestety na ustawieniach .htaccess a chciałbym aby wszystkie adresy z www były przekierowywane na takiebez www ,w internecie znalazłem kod który powinien to robić ,niestety nie działa na mojej stronie http://ejobseeker.net poniżej wklejam zawartość .htaccess prosze o pomoc


Cytat
Options +FollowSymlinks
RewriteEngine on

<files .htaccess>
order allow,deny
deny from all
</files>

RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC,OR]
RewriteCond %{REQUEST_FILENAME} -l [NC]
RewriteRule .* - [L]

# BEGIN GENERAL English
RewriteRule (.*)/$ /?countrySelect=$1&seo_url1=$2
RewriteRule (.*)/+/(.*)-(.*)\.html$ search-jobs.php?countrySelect=$1&jobSelect=$2&seo_url1=$3&submit=1
RewriteRule (.*)/(.*)/(.*)-(.*)\.html$ search-jobs.php?jobLocation=$2&countrySelect=$1&jobSelect=$3&seo_url1=$4&submit=1
RewriteRule (.*)/(.*)_(.*)\.html$ detail.php?name=$2&id=$3&detail=true&countrySelect=$1

#RewriteRule (.*)-jobs-in-(.*).html search-jobs.php?jobSelect=$1&countrySelect=$2&submit=1
#RewriteRule ^(.*)_(.*).html detail.php?name=$1&id=$2&detail=true

RewriteCond %{HTTP_HOST} !^(www\.)?ejobseeker\.net$ [NC]
RewriteCond %{HTTP_HOST} ^([a-z]+)\.ejobseeker\.net$
RewriteCond %{REQUEST_URI} !^/?index\.php$
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]


Ten post edytował piotrekr 4.09.2012, 08:54:39
Go to the top of the page
+Quote Post
rocktech.pl
post
Post #2





Grupa: Zarejestrowani
Postów: 587
Pomógł: 131
Dołączył: 8.02.2010

Ostrzeżenie: (0%)
-----


Witam.
Daj to w 3 linijce pliku przed <files .htacces>

[APACHE] pobierz, plaintext
  1. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
  2. RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
[APACHE] pobierz, plaintext


--------------------
Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo. --Brian Moore

I never go looking for a sucker. I look for a Champion and make a sucker of of him. --Amarillo Slim


Home-made : js-gui-classes | Accordion | Tabs | Carousel / php-sms-classes | Obsługa bramki SMS MultiInfo | Obsługa bramki SMS Mobiltek
Go to the top of the page
+Quote Post
piotrekr
post
Post #3





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 19.08.2011

Ostrzeżenie: (0%)
-----


dzięki działa exclamation.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 09:32