Đã Hủy

simple .htaccess re-write needed (mod_rewrite)

Hi,

I have a site I am setting up on the CMS Modx. It has an existing .htaccess file which re-writes friendly urls such as:

[url removed, login to view]

to

[url removed, login to view]

I need to add an additional query string that can be rewritten in as well.

I need to have a url such as:

[url removed, login to view]

rewritten to

[url removed, login to view]

BUT all other requests such as [url removed, login to view] still need to work.

I also require that the 'friendly url' stays in the browser address bar not the re-written one.

The existing .htaccess file is below and I need this to remain entact:

# Friendly URLs Part

RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} .

#

# Force all pages to go to [url removed, login to view] for SEO

RewriteCond %{HTTP_HOST} !^www\.my-domain\.[url removed, login to view] [NC]

RewriteRule (.*) [url removed, login to view]$1 [R=301,L]

#

# Friendly URLs

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ [url removed, login to view]$1 [L,QSA]

#

# Additional Settings

ExpiresActive On

ExpiresByType image/gif A2592000

ExpiresByType image/jpeg A2592000

ExpiresByType image/png A2592000

BrowserMatch "MSIE" brokenvary=1

BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1

BrowserMatch "Opera" !brokenvary

SetEnvIf brokenvary 1 force-no-vary

#

# Locked down while under development

AuthName "Restricted Area"

AuthType Basic

AuthUserFile /home/path/public_html/[url removed, login to view]

AuthGroupFile /null

require valid-user

Kỹ năng: Apache, Linux, Quản trị hệ thống

Xem thêm: address write, simple gif, need friendly write, simple query, htaccess, d re, force gif, simple seo urls, php rewriteengine, php image write, htaccess rewriteengine, htaccess 301, php htaccess rewriteengine, rewriteengine, image query, need modx development, php htaccess, linux htaccess 301, mod seo, rewritebase htaccess file, force file, needed work home admin, linux simple php site, modx site, friendly query

Về Bên Thuê:
( 2 nhận xét ) Brighton, United Kingdom

Mã Dự Án: #1667558

6 freelancer đang chào giá trung bình £62 cho công việc này

U05B8ZScg

<i>The Administrator removed this message for containing contact details which breaches our Terms of Service</i>

£250 GBP trong 1 ngày
(0 Đánh Giá)
0.0
whearn

I have a prototype ready.

£20 GBP trong 1 ngày
(0 Đánh Giá)
0.0
srini286

This seems to be a simple thing which can be done by a regex, I have tried this and got it working, mod_rewrite log ::1 - - [31/May/2012:10:53:03 +051800] [localhost/sid#10080d720][rid#10096d6a8/initial] (2) [perdir Thêm

£20 GBP trong 1 ngày
(0 Đánh Giá)
0.0
mitja0

I'm ready ;)

£30 GBP trong 1 ngày
(0 Đánh Giá)
0.0
FreeAl

Hello, I can do it now

£30 GBP trong 1 ngày
(0 Đánh Giá)
0.0
charlesmx

Your Solution: Place just above the Friendly URL Section of your current .htaccess file. RewriteRule ^agency/([0-9])/?$ [url removed, login to view]$1 [NC,L]

£20 GBP trong 1 ngày
(0 Đánh Giá)
0.0